Forum
FAQs page using categories
Having trouble using Categories to create FAQs page and displaying Q &As on single page.
I have successfully created region for FAQs and have following code in my faq.html content template -
<perch:categories id="faqs" label="FAQs" set="FAQs" required="true" />
<p><span class="dark"><strong><perch:content id="question" type="text" label="Question" required="true" title="true" /></strong></span></p>
<p><perch:content id="answer" type="textarea" label="Answer" markdown="true" editor="markitup" required="true" /></p>
</perch:categories>
This has allowed me to add FAQs and assign them to category.
Can't get the content to display using -
perch_content_custom('FAQs', array(
'template' => 'faq.html',
'category' => 'faqs/questions/',
));
I can see the correct number of P tags so the code is correctly looping through the FAQs but not showing the question and answer text content?
Hope that makes sense.
Thanks
I would also like to know please how I could loop through all categories displaying cat title and then the faqs for that cat all on the one FAQ page allowing the client to add Categories and FAQ items without me needing to manually add a region for each category?
Hope that also makes sense. Thanks again
Can you try changing:
to
Hi Drew. Thanks but still no joy. The odd thing is the loop is working, showing correct number of passes but just no content.
Does this code need to be inside category tag ?
That is all I have on the page to display the content. I used a perch_content_create tag to initially set up the region.
Keith
I may have fixed it ....
changed my faq.html template to
from this
I had added the perch:categories tags to enable me to assign the faqs to a category, I'm a little confused but...
My display page now has -
Seems to be working....
Keith