Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
How to use and understand category
I have a section called outdoor and two categories (Conversation Sets – Patio-dining-sets) . What I am trying to do is when someone click on either categories, then it list all the products. But when you click on a single product it displays more informations. Can anyone help me please. Thank you
Conversation Sets—> show all product —> show single product
Patio-dining-Sets—> show all product —> show single product
Offline
#2 2017-01-09 22:40:38
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How to use and understand category
If I understand you correctly, you would need something like this on your page:
<txp:if_section name="outdoor">
<txp:if_category>
<!-- this is the category landing page -->
<h2>Products in <txp:category title="1" /></h2>
<txp:article_custom category='<txp:category />' break="li" wraptag="ul" limit="999">
<txp:permlink><txp:title /></txp:permlink>
</txp:article_custom>
<txp:else />
<txp:if_individual_article>
<!-- this is the individual article page -->
<txp:article form="your-individual-article-form" />
<txp:else />
<!-- this is the section landing page -->
<h2>All categories</h2>
<txp:category_list categories="conversation-sets,patio-dining-sets" this_section="1" break="li" wraptag="ul" />
</txp:if_individual_article>
</txp:if_category>
</txp:if_section>
I hope this helps, if not let me know!
Offline
Re: How to use and understand category
Thank you so much, it worked.
Last edited by code365 (2017-01-10 04:56:25)
Offline
Pages: 1