Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-11-08 22:01:43

lithium002
Member
Registered: 2011-04-29
Posts: 25

Why won't this work: category1 inside file_download_list

I’m trying to list downloads for files within a certain files category BASED on the category that is currently being used by the current article displayed (both the article’s category and the file category have identical names) however, the code below won’t work!

<txp:file_download_list category="<txp:category1 />" form="files" limit="999" sort="filename asc" wraptag="" break="" />

The name of the article is also identical to the files category name so I tried this:

<txp:file_download_list category="<txp:title />" form="files" limit="999" sort="filename asc" wraptag="" break="" />

and it didn’t work either.

Am I missing something important here? Can anyone nudge me in the right direction?

Offline

#2 2011-11-08 22:28:35

lithium002
Member
Registered: 2011-04-29
Posts: 25

Re: Why won't this work: category1 inside file_download_list

I just realized that <txp:category /> doesn’t work but <txp:category title=“1” /> worked! :)

Offline

#3 2011-11-08 22:40:42

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Why won't this work: category1 inside file_download_list

Regardless whether one of your tag nestings would work, you’d have to use single quotes around nested tags.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#4 2011-11-08 22:45:22

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

Re: Why won't this work: category1 inside file_download_list

uli wrote:

Regardless whether one of your tag nestings would work, you’d have to use single quotes around nested tags.

Yup, as in:

<txp:file_download_list category='<txp:category1 />' />

Notice the single quotes. For more information take a look at Parsing Tag Attributes.

Offline

Board footer

Powered by FluxBB