Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-11-06 22:49:41

zaodust
Member
From: USA: East Coast
Registered: 2007-11-15
Posts: 13
Website

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

#2 2008-11-06 23:16:15

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

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

#4 2008-11-07 02:58:55

zaodust
Member
From: USA: East Coast
Registered: 2007-11-15
Posts: 13
Website

Re: How do I customize a page title...

Just what I needed. Thank you both very much.


[ zaodust ]

Offline

Board footer

Powered by FluxBB