Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
How do I customize a page title...
I’m aiming to use something other than the “section title” here. Is there a way to do this?
For example:
Site Name: My Domain
Section Title: About
With these settings, my current page title is: “ My Domain | About “
I want to use “ My Domain | Something different than About “
I realize the “section title” reflects a navigation link as well – but I want my title to reflect something different than my navigation link name.
Any way to accomplish this?
Thanks!
[ zaodust ]
Offline
Re: How do I customize a page title...
Believe the only way to do this would be to use <txp:site_name /> | <txp:if_section name="about">Something different than <txp:section title="1" /></txp:if_section>
in your template – and maybe a conditional for each section? Okay for a smaller sites but not ideal for larger ones.
Offline
#3 2008-11-06 23:35:57
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How do I customize a page title...
If you’ve got lots of sections that need custom text for page titles, you could use asy_wondertag, create a form for each section containing it’s custom page title, name the forms ‘about_page_title’ and so on, and use
<title>
<txp:site_name />
<txp:if_section name="">
<txp:else /> |
<txp:asy_wondertag>
<txp:output_form form="<txp:section />_page_title" />
</txp:asy_wondertag>
</txp:if_section>
</title>
Offline
Re: How do I customize a page title...
Just what I needed. Thank you both very much.
[ zaodust ]
Offline
Pages: 1