Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
How about a conditional for files?
OK, just to state what would be obvious to someone looking over my shoulder, I’m building a subtly complex site with Textpattern when a whole list of other CMS’s would be better suited. The site is for a band, and as such, has special needs that aren’t really covered by Textpattern.
The site is here if you want to peek: http://funkngroove.davebias.org/
I still have a lingering issue with iFrames that no one seems to be able to answer:
So here is my current problem (on the media page if you’re following along)
This code obviously doesn’t work – although I hope you can see my logic:
(code brackets removed)
txp:if_category name=“video”
p Click one of the thumbnails below to view a Quicktime video. /p
txp:file_download_list category=“video” limit=“8” wraptag=“ul” break=“li” sort=“id asc” form=“cmEasyFiles”
txp:else
p None at this time /p
/txp:if_category
I want to show links to downloads if there are any in a particular file category and “none at the time” if there aren’t any. I have three columns for the different categories.
Is there a way around this – a plug-in – or am I simply thinking about it the wrong way?
any help on this will be much appreciated.
Dave
Last edited by davebias (2006-04-25 23:37:05)
Offline
#2 2006-04-26 01:22:34
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: How about a conditional for files?
you could try the chh_if_data plugin … maybe like this:
<txp:chh_if_data><txp:file_download_list category="video" /></txp:chh_if_data>
<txp:chh_if_data><txp:file_download_list category="audio" /></txp:chh_if_data>
Offline
Re: How about a conditional for files?
That did the trick – thanks nardo!!
Offline
Pages: 1