Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-21 06:25:07

placenamehere
Archived Plugin Author
Registered: 2004-11-21
Posts: 88
Website

generating a category address

Its late so I may have missed something simple, but I’ll ask anyway…

In the context of a category listing page I want to get the category URI.. i don’t want the full <a> that you get with <txp:category link="1" /> because I want to add other attributes to the link element. I could, but I’d rather not just pull the category name and construct the address myself becuase then I lose the ability to change from messy to clean address modes easily.

Specific context I’m looking to replace is in the default page template where I have a <txp:if_category> block to generate a header for the page listing.. and I’m looking to go from using something like:

<h2>Articles for Category: web</h2>

to
<h2>Articles for Category: <a href="/category/web/" rel="tag">web</a></h2>


Site: placenamehere.com
Microformat Plugin: pnh_mf

Offline

#2 2006-03-21 06:58:58

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: generating a category address

You might consider the latest incarnation of zem_link, which offers just about every useful attribute an <a> tag can bear, and links to roundabout every item in your Textpatterned site, even categories and sections.

Offline

#3 2006-03-21 20:18:53

placenamehere
Archived Plugin Author
Registered: 2004-11-21
Posts: 88
Website

Re: generating a category address

hmmm

i’d probably sooner go the hard coded path route then the plugin… not that there’s anything wrong with that, but its only one small case on this install that I’ll need it.

i could probably embed some php too

just seems one of those txp oddities — that there ar 3 ways to get some info but none the way i need it — the assumptions made on usage just don’t line up.


Site: placenamehere.com
Microformat Plugin: pnh_mf

Offline

Board footer

Powered by FluxBB