Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2005-10-24 12:13:49
- matgorb
- Member
- Registered: 2005-06-12
- Posts: 31
Customize title with section
I use this in my header form
<title><txp:page_title />
<txp:if_article_list><txp:section /></txp:if_article_list>
</title>
I think the txp:section doesn’t work on list which is where I really need it, any idea on how to do this without too much mess (considering this is a form reused on every page)
mat
Last edited by matgorb (2005-10-24 12:14:40)
Offline
Offline
#3 2005-10-24 13:35:32
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Customize title with section
<txp:if_article_list><txp:section title="y" /></txp:if_article_list>
works for me. The only problem is that it also shows ‘default’ when you’re in section default. You could work around that by using something like this:
<code>
<txp:if_section section=”“>
<txp:else />
<txp:section title=“y” />
</txp:if_section>
</code>
You can also use the mdn_if_section plugin instead of <txp:if_section>
.
Note: this also displays the section when on an individual article page. <txp:section />
displays the section whenever the section is in the url.
Offline
#4 2005-10-24 16:11:35
- matgorb
- Member
- Registered: 2005-06-12
- Posts: 31
Re: Customize title with section
I tried the <txp:section title="y" />
and it didn’t work, no idea why.
I will just to have to start looking at plugin, this is kinda annoying to have to look at plugin all the time but this seem to be the txp philosophy.
Offline
#5 2005-10-24 18:41:24
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Customize title with section
What version are you using? The title attribute was introduced only last month.
Offline
#6 2005-10-24 19:15:22
- matgorb
- Member
- Registered: 2005-06-12
- Posts: 31
Re: Customize title with section
4.0.1, the latest if I’m not mistaken.
I thought it could have been because this was in a form and not in a page, however I tried in a page and it does not work either.
I’m really lost on this one, I don’t know why your solution doesn’t work. Could it be some setting somewhere?
Offline
Re: Customize title with section
It won’t be availablt until 4.0.2 Els is using a latest revision from SVN. The title attribute was tidied up after 4.0.1 was released and now also works for <code><txp:category /></code>.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#8 2005-10-24 21:10:18
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Customize title with section
Sorry about that, I didn’t think about it not being available in the official 4.0.1.
Offline
#9 2005-10-25 06:33:46
- matgorb
- Member
- Registered: 2005-06-12
- Posts: 31
Re: Customize title with section
Well I guess I will have to wait or use a plugin then.
Thanks anyway.
Offline
Pages: 1