Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-01-18 01:11:33
- deronsizemore
- Member
- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
how do I create custom page titles?
I’d like to be able to display customer titles, more so then the <txp: page_title />
has to offer.
Someone a couple months ago told me that I could use the <txp: if_section>
tags. I’ve tried to use them, but cannot figure it out. I’ve tried this:
<txp: if_section name="about">
Deron Sizemore Design – About Me!
</txp: if section>
<br />
Is that just completely wrong? Is there a way to do something like this or should I just use static content for each section of the site?
Offline
Re: how do I create custom page titles?
You could do things like that, it’s perfectly ok. Or it depend, what do you need exactly ?
Offline
#3 2006-01-18 02:25:57
- deronsizemore
- Member
- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Re: how do I create custom page titles?
Well basically it seems simple to me, I just can’t wrap my mind around it.
All I’m wanting to do is have “Deron Sizemore Design” display in the title of each page, followed by whatever section/category the visitor is in. So if they are in the contact section then it would display “Deron Sizemore Design – Contact”
Or for example in my portfolio section which when it’s done I’m going to have 3 categories (websites, logos, illustrations). So in one of these sections it would display something like “Deron Sizemore Design – Portfolio – Logos”.
I guess in every section besides the portfolio since it will have 3 categories I could just use text in the html of each corresponding page in between the <title>
tags.
Offline
#4 2006-01-18 03:42:40
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: how do I create custom page titles?
try the ob1_title plugin
Offline
Re: how do I create custom page titles?
You could go to the “sections” tab in TXP and put what you want to appear for each section into the “title” box. Then in your template if you used <code><txp:section title=“1” /></code> it would output the title you just entered and it will change from section to section. If you want category names to appear as well you could use some extra tags in such a way:-
<code><txp:section title=“1” />
<txp:if_category>
<br />The <txp:category title=“1” /> Category.</txp:if_category></code>
<br />
I think that should work.
Last edited by thebombsite (2006-01-18 04:12:51)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#6 2006-01-18 13:34:09
- deronsizemore
- Member
- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Re: how do I create custom page titles?
Thanks Nardo…I’ll have a look at it! :)
<br />
<br />
Thebombsite: Thanks, the <txp:section title="1" /> worked great! I've not tried the second suggestion yet for the categories. I am wondering though wy I would need the "category" wrote in between the
<txp:category title=“1” /> Category. </txp:if_category>@ tags? Or are you just showing what it would look like? I thought it would just automatially display the category corresponding to that section?
Offline
Re: how do I create custom page titles?
No need to have the “Category” text if you don’t want it. It was just an example plus I was thinking that it might become quite a long title with a category name added as well, thus I stuck a “break” in there. It’s the tags that are the important bit though.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Pages: 1