Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
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
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
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
Pages: 1