Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
List of links, grouped by category
Hi,
I’m new so apologies for the basic question.
I am trying to generate a Links page, to output every link, grouped by category.
“For each link category, display a Heading 4 with the category name, then an unordered list of hyperlinks in that category.”
This is what I want my output to look like:
Walking
Canoeing
Cycling
And here is the code I have tried:
<txp:category_list wraptag="ul" break="li" type="link">
<txp:category title="1" wraptag="h4" />
<txp:linklist wraptag="ul" break="li" category="<txp:category />" />
</txp:category_list>
The headings are displayed properly, but there are no links.
If I hard-code a category name then it works, so I think it’s category="<txp:category />"
that is the problem.
I don’t know what I am doing wrong, so any help would be appreciated. Thanks in advance.
Offline
Offline
Re: List of links, grouped by category
etc wrote #327045:
Hi, welcome to the forum.
You are right, one must use single quotes here :
category='<txp:category />'
.
I had not noticed the difference between double and single quotes here! Thank you for your help.
Offline
Pages: 1