1

I have 2 separate sections living in the same place on my site. Example:

  • About (Single-type Section)
    • Team (Structure-type Section)

So in the URL I need to nest Team underneath About, i.e. /about/team. Since they're not in the same section I can't do it the built-in way, so how would I accomplish this?

4

The Team section’s landing page could just be a template living at about/team/index.html. From there if you want to output info about the team members, just fetch it manually:

{% for teamMember in craft.entries.section('team') %}
    <h3>{{ teamMember.title }}</h3>
    ...
{% endfor %}

If you want to give each Team entry its own page on the site, go into the Team section’s settings and check the “Entries in this section have their own URLs” checkbox. Set the URL Format to about/team/{slug}, and the Template to about/team/_entry. Then create an about/team/_entry.html template with whatever info you want. (The current Team entry will be available to the template as an entry variable.)

From the index, within that for-loop, you can link to the team member’s pages like this:

<a href="{{ teamMember.url }}">{{ teamMember.title }}</a>
| 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.