Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Use custom <title></title> for a tab
Hi folks…
What should be the syntax to use, in a plugin, to overwrite the default page <title></title> of a tab ?
To hardcode the <title></title> ?
Thanks !
Last edited by hablablow (2011-12-08 16:10:49)
_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__
Offline
Re: Use custom <title></title> for a tab
Of a tab? On the admin-side? For admin-side the only thing you can change from the title is the panel’s name, which is set via pagetop(). If you want to modify already existing tab’s title, you can modify the language string used. Some (*cough* most *cough*) plugin’s may not use language strings, but all core tabs do.
Of course there are also hackish ways of capturing output buffer and then using regex (or HTML parser) to replace the title. But you probably shouldn’t do that. You could also use JavaScript to do the same (also not exactly recommended).
That said, if you are just referring to the frontend, then changing the page title is as simple as using which ever tags you want, or for a plugin, offering new tags.
As for the backend, you could also use the same hackish method for frontend (capturing output buffer or JavaScript and what not), but I wouldn’t exactly recommend such method. I would just offer new tags if needed. If core tags, or some other plugin, can already provide same results, I would offer the necessary snippet, or point to users to the right 3rd party plugin.
Last edited by Gocom (2011-12-08 17:57:39)
Offline
Re: Use custom <title></title> for a tab
Jukka…
I’m trying to set a unique page title for a custom created tab in the backend only.
Either I capture the output buffer or do this via Javascript.
Both solutions seem hackish…
I don’t get the last par of your reply very well… What do you mean by: I would just offer new tags if needed etc…
Cheese.
PC: Why regex ? I just need to catch the whole title and replace it with a fixed value…
Last edited by hablablow (2011-12-08 20:28:17)
_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__
Offline