Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
output an article list, restricted to a certain category
Hello,
in order to complete the (sub)navigation of the site I am working on,
I need to be able to output:
<div id="links">
<dl id="nav">
<dt><a href="#">HEADER 1</a></dt>
<dd><a href="#">CONTENT 1a</a></dd>
<dd><a href="#">CONTENT 1b</a></dd>
<dt><a href="#">HEADER 2</a></dt>
<dd><a href="#">CONTENT 2a</a></dd>
<dd><a href="#">CONTENT 2b</a></dd>
<dt><a href="#">HEADER 3</a></dt>
<dd><a href="#">CONTENT 3a</a></dd>
<dd><a href="#">CONTENT 3b</a></dd>
</dl>
</div><!-- end #links -->
the <dt>
, HEADERx
, is the name of a category, but I can hardcode this. It doesn’t have to be dynamic.
the <dd>
’s are the titles of articles belonging to a certain category…
So I should be able to create this:
<dt><a href="#">Category1</a></dt>
<dd><a href="#">Title of Article1 belonging to Category1</a></dd>
<dd><a href="#">Title of Article2 belonging to Category1</a></dd>
...
Is this possible?
I know <txp: article_custom />
accepts a category="....."
attribute,
but I don’t know how to use <txp: article_custom />
to only output a list of titles…
I do know how to output this list using <txp: article />
, but in this case, I don’t know how to specify the desired category…
Can anybody please help me?
Dutch Ruby on Rails news and articles: OnRails
Offline
Re: output an article list, restricted to a certain category
Sorry, I just found out how to solve this problem…
I can just use <txp: article_custom>
, specify the category="Category1"
, ánd finally specify the form to use: form="ArticleTitle"
…
I then have to create a form called “ArticleTitle”, that only outputs the title of the desired articles.
I thought it could be solved in 1 step: a tag,
I didn’t think about 2 steps: a tag + a form.
It’s been a while since I coded my last TXP site…
Last edited by johan_vm (2007-06-30 17:33:02)
Dutch Ruby on Rails news and articles: OnRails
Offline