Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-06-14 11:18:15

alexwest
Member
From: Järna, Sweden
Registered: 2004-08-04
Posts: 53

Type attribute for <txp:category>

Trying to output the Category Title for the Links page in a recent project, I tried using <code><txp:category title=“1” /></code> to no success. Going through the forum on this issue I found these related topics: one and two and three.

In my opinion, since txp:category1 and txp:category2 are already Article type context sensitive, having the option of setting the type attribute to txp:category would be the logical use, I think, for this tag.

The changes to the code are simple. In publish/taghandlers.php

  • between lines 1146 and 1150 add
    <blockquote>‘type’ => ‘’,</blockquote>
  • change line 1157 to
    <blockquote>$cat_title = ($title ? fetch_category_title($cat, $type) : $cat);
    </blockquote>

This refers to TXP 4.0.3 (r1188)

Cheers,
Alex


be safe and happy

Offline

#2 2006-07-04 15:18:34

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Type attribute for <txp:category>

Added. r1407. Thanks. :)

Offline

Board footer

Powered by FluxBB