Looking for some input on how to setup a Craft site. I have 2 sections of the site containing content grouped by the same set of topics (or categories).

For example, within Services there 6 sub-pages. Resources has 6 sub-pages using the same categories as Services.

In other words there is a page under Services and Resources named Topic 1. In Services the Topic 1 page will contain a description of Topic 1. Under Resources the Topic 1 page will contain PDFs and FAQs related to Topic 1. The PDFs and FAQs would ideally be sorted by a custom order. There are similar pages under Services and Resources for Topic 2, Topic 3, etc.

enter image description here

Recommendations on how to set this up in Craft?

  • So your sections entry type for Services & Resource both have a category inputs that points to your topics category group? You have created entries in both Services & Resources with titles (Topic 1, Topic 2, etc.) And in those entries you have also selected the category with the same name? – aran Oct 30 '15 at 6:06
  • Yes, both Services and Resources use the same category group and entries within those 2 sections will have a 1-1 mapping. – Brett DeWoody Oct 30 '15 at 15:08

You need to create several inputs and apply them to your topics category group.

  1. Description field
  2. Assets field for PDF's
  3. Matrix field that allows the user to add multiple FAQ's

In your Services detail page get the category from your category input and output the description:

{% set topic =  entry.categoryInputHandle.first() %}
{{ topic.descriptionFieldHandle }}

Next in your Resources detail page grab the category and output the PDF and FAQ's.

{% set topic =  entry.categoryInputHandle.first() %}
<a href="{{ topic.assetFieldHandle[0].url }}>PDF</a>
{% for faq in topic.faqMatrixFieldHandle %}
    {# output the different fields you setup in the matrix… #}
{% endfor %}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.