Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-09-06 19:59:43

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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?

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

#3 2005-09-07 00:23:18

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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.

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

#5 2005-09-07 00:41:01

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: Add title to txp:s and txp:c

It was good while it lasted, but the time is near.

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

#7 2005-09-07 13:26:18

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: Add title to txp:s and txp:c

I saw it come through the svn RSS feed recently.

Offline

#8 2005-10-19 03:49:30

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#9 2005-10-19 13:05:41

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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

Offline

#10 2005-10-19 13:12:41

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#11 2005-10-19 13:15:43

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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.

Offline

Board footer

Powered by FluxBB