Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Categories Images
Hi,
I am trying to figure out how to pull each image folders from the categories. I looked through the documentation on <txp:images/>and <txp:image/>, still not able to pull the category images from each folder. Can someone help me please or point me where to get abetter understanding. Thank you
Folder-name-a (images)
Folder-name-b (images)
This does not works with category
<txp:images category='<txp:category />' >
<txp:image />
</txp:images>
This works with a single category name
<txp:images category='landscape-image' >
<txp:image />
</txp:images>
Last edited by code365 (2020-11-02 03:47:18)
Offline
Re: Categories Images
Your first example will work if the article category is the same as the image category
The second example will work anywhere but double-quotes are advised:
<txp:images category="landscape-image">
<txp:image />
</txp:images>
What I do not understand is your question about folders. txp does not create any folders for images.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Categories Images
When you go to content->categories->images section, you have to type a name to create a new category. Maybe I am not using the right term, but it create a new category list in the images column. I am trying to have the category return a lists.
category-a
category-b
category-c
Last edited by code365 (2020-11-02 06:05:21)
Offline
Re: Categories Images
I’m not sure what you’re trying to accomplish. Do you want to display every image from every image category?
…Prrrrrrrr…
Offline
Re: Categories Images
Yes, every image category with an image from each list.
Last edited by code365 (2020-11-02 06:43:00)
Offline
Re: Categories Images
I think you manually have to type every category name then, separated by a comma:
<txp:images category="category-a, category-b, category-c">
<txp:image />
</txp:images>
…Prrrrrrrr…
Offline
Re: Categories Images
You can try this
<txp:images category='<txp:category_list type="image" break="," />'>
<txp:image />
</txp:images>
or this
<txp:category_list type="image" break="">
<txp:category title wraptag="h3" />
<txp:images category='<txp:category />'>
<txp:image />
</txp:images>
</txp:category_list>
Offline
Re: Categories Images
Thank you for your time and help etc. So category_list and category are global tag.
Last edited by code365 (2020-11-04 03:14:46)
Offline
Pages: 1