You are not logged in.
Pages: 1
Hi,
Anyone know any way to display only a category’s sub-category names and their images. For example image category ‘web’ has sub-categories ‘sport’ and ‘leisure’, I want to display each category name and it images so i see name, images, name, images …. etc.
anyone any clues?
Thanks
Paul
Offline
Hi redbot,
Thanks for your reply. The tag only displays the categoriy names, not the images in that category. I’m using smd_gallery plugin to get the images on screen, if anything i suppose its the plugin that would solve it…
Thanks again
Paul
Offline
pauldob wrote:
the images in that category
You can use <txp:category_list> as a container tag so you can then do something with each matching category. Like this (untested):
<txp:category_list parent="web" exclude="web" type="image">
<h2>Images in <txp:category title="1" /></h2>
<txp:images category='<txp:category />'>
<txp:thumbnail wraptag="div" class="thumb" />
<txp:image_info wraptag="span" class="caption" />
</txp:images>
</txp:category_list>
Alternatively you can defer the contained content to a form using the form attribute if you intend to re-use it somewhere else. The good news is that you shouldn’t need smd_gallery for this: you can put in whatever standard markup and txp tags you want to obtain the desired effect, e.g. click-to-view fullsize, hover to show fullsize, a gallery jQuery plugin…
Hope that helps.
Last edited by Bloke (2012-12-19 09:29:02)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern.
Txp Builders – finely-crafted code, design and Txp
Offline
Stef,
Thanks for that it worked a treat, thanks for the mail also.
Regards
An appreciative txp user!
Offline
Pages: 1