Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-11-15 03:15:45

scottcal
Member
From: Encinitas, CA
Registered: 2010-09-04
Posts: 21
Website

Post List of Current Category plus children

Hi Everyone!

I am trying to publish a list of articles in the current category plus the children of that category. I can’t seem to get in right. In my current code I found that you just can’t do single quotes inside of single quotes. How do I do it? Here is what I have so far.

<txp:article_custom section="articles,tipsarticles,video" form="ReadMore" category='<txp:category_list parent='<txp:category />' children="0" exclude="tips" />' limit="9999" status="4">

Offline

#2 2012-11-15 04:33:07

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Post List of Current Category plus children

You can nest quotes by escaping. Quotes can be escaped with quotes, by doubling. E.g.

<txp:article_custom category='<txp:category_list parent=''<txp:category />'' />' />

You can find the tag parser’s attribute related features outlined here.

Last edited by Gocom (2012-11-15 04:35:14)

Offline

#3 2012-11-15 05:25:31

scottcal
Member
From: Encinitas, CA
Registered: 2010-09-04
Posts: 21
Website

Re: Post List of Current Category plus children

That’s really helpful thanks. Didn’t even realize escaping was possible in txp. Appreciate the heads up. It’s still not quite right, but a little more tweaking and I should be good.

Offline

Board footer

Powered by FluxBB