Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-11-09 14:55:38

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 208
Website

List Articles' Categories in another Section, not front page

Hi! I got this trouble…

Default page:
<txp:category_list exclude="noticias" wraptag="ul" section="cat" break="" class="catlist"> <li<txp:if_category name='<txp:category />'> class="active"</txp:if_category>><txp:category title="1" link="1" section="cat" /></li> </txp:category_list>

Cat section:
<h1><txp:category title="1" /></h1> <txp:article_custom time="any" limit="10" category="<txp:category />" form="eventos-categoria" />

What I want is to show the Articles’ Category in another section “Cat”, rather than FrontPage. So I tried that code, with no sucess.

Any help?

Thank you in advance!

PS. Sorry bad English :(

Last edited by robhert (2011-11-09 15:18:30)

Offline

#2 2011-11-09 15:26:53

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: List Articles' Categories in another Section, not front page

Hola Robhert.

Acordate que, when using txp tags inside txp tags, you have to escape them with single quotes:

<txp:article_custom time="any" limit="10" category='<txp:category />' form="eventos-categoria" />

Saludos!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2011-11-09 16:16:01

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 208
Website

Re: List Articles' Categories in another Section, not front page

Hola Maniqui! Thanks for you answer!

It worked! One question: is it posible to have pagination (article_custom)? Or to use “article” to do the same?

Thank you!!!

Offline

#4 2011-11-09 19:52:22

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: List Articles' Categories in another Section, not front page

txp:article wouldn’t work in your setup. To get pagination with article_custom, you can try this or this.

Offline

#5 2011-11-10 11:10:20

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 208
Website

Re: List Articles' Categories in another Section, not front page

Hey Els! Thank you! I’m going to test them.

Offline

Board footer

Powered by FluxBB