Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Add title to txp:s and txp:c
Txp 4.0.1 now has the title attribute for some tags like txp:category1, txp:section. Could this be added to txp:c and txp:s so that it can show the current category’s or section’s title in addition to the name?
Refresh Dallas and other Refreshing Cities.
Offline
#2 2005-09-06 23:20:27
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Add title to txp:s and txp:c
Could this be added to txp:c and txp:s so that it can show the current category’s or section’s title in addition to the name?
txp:s and txp:c are just references to the internal variables, not full-blown tags, so they can’t have attributes.
It would make sense to allow the category1/2 and section tags to access the page context though, as well as the article context.
Alex
Offline
Re: Add title to txp:s and txp:c
That would be excellent Alex! That is what I wanted anyway. It would allow me to get rid of a couple of mary’s plugins.
Refresh Dallas and other Refreshing Cities.
Offline
#4 2005-09-07 00:34:20
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Add title to txp:s and txp:c
sniff Oh the betrayal! ;D
Offline
Re: Add title to txp:s and txp:c
It was good while it lasted, but the time is near.
Refresh Dallas and other Refreshing Cities.
Offline
#6 2005-09-07 09:20:11
- alexandra
- Member
- From: Cologne, Germany
- Registered: 2004-04-02
- Posts: 1,370
Re: Add title to txp:s and txp:c
Hi tiny, how did you find out about the title attribute? Taggenerators do not offer a title attribute…
just like to know for the german tag list. thx
Offline
Re: Add title to txp:s and txp:c
I saw it come through the svn RSS feed recently.
Refresh Dallas and other Refreshing Cities.
Offline
Re: Add title to txp:s and txp:c
<blockquote><p>It would make sense to allow the category1/2 and section tags to access the page context though, as well as the article context.</p></blockquote>
Yes, it would make sense at all :)
I still use <code><txp:s /></code> to output the section name in page templates. It’s a nice tag to also do some CSS customization tricks for styling different sections, by insterting that tag in places like <code>id=”“</code> or <code>class=”“</code>.
Until the txp:section tag becomes usable in page templates, in the meanwhile, you can use some CSS tricks to transform those plain “articles”, “links”, “contact” in “Articles”, “Links”, “Contact”:
- just use the <a href=“http://www.htmlhelp.com/reference/css/text/text-transform.html”>text-transform property</a> to transform your text to capitalizes first characters, uppercase, etc.
- maybe, you would like to use the <a href=“http://www.htmlhelp.com/reference/css/font/font-variant.html”>font-variant property</a> and convert your section names characters to small-caps.
Of course, those sections with a – in the middle (like “about-us”) are still a “big problem”.
Last edited by maniqui (2005-10-19 05:20:58)
Offline
Re: Add title to txp:s and txp:c
maniqui – You can now use txp:section in the page template. Like so, <code><txp:section title=“1” /></code> it will output the current section’s title I no longer use txp:s
Refresh Dallas and other Refreshing Cities.
Offline
Re: Add title to txp:s and txp:c
>you can now use txp:section in the page template.
tinifly, I have tried that in 4.0.1 and it doesnt work for me if I use it in the page template.
maybe, by “now”, you are talking in a TXP repository version, arent you?
Offline
Re: Add title to txp:s and txp:c
Yea, you are right. They have made many changes since the official 4.0.1 release. Hopefully they will have the next release out soon.
Refresh Dallas and other Refreshing Cities.
Offline
Pages: 1