Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Generate contextual section links
Hello, I need to generate, in each article, all the articles pertaining to the section.
I tried this code:
<txp:article_custom section="<txp:section />">
<li><txp:permlink><txp:title /></txp:permlink></li>
</txp:article>
but the page returns null.
Thanks for any help
Offline
Re: Generate contextual section links
You need to use single quotes when using txp:tags as attributes of another txp:tag:
<txp:article_custom section='<txp:section />'>
<li><txp:permlink><txp:title /></txp:permlink></li>
</txp:article>
TXP Builders – finely-crafted code, design and txp
Online
Re: Generate contextual section links
You also need to use </txp:article_custom>
as your closing tag :-)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Generate contextual section links
Manaus wrote:
Hello, I need to generate, in each article, all the articles pertaining to the section.
If you have a lot of articles you’ll also need to add a high enough limit otherwise it’ll just return the last 10 entries.
<txp:article_custom section='<txp:section />' limit="999">
...
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Pages: 1