I like to have one template to output more than one collection, which aren't defined yet. Client want to give a few artists access to a simple blog on their site. So every artist gets a collection 'blog artistname'.

Client creates one page for each artist which has their collection mounted.

I really like to only have one template to check for a collection based on its id and show it on the appropriate page.

How can I go about this?

Code I have so far:

<section>
    {{ collection:blog-maker limit="2" paginate="true" as="entries" }}
    <ul class="grid-view">
      {{ entries }}
      <li class="item">
        <a href="{{ url }}">
          <div class="img-wrapper">
            <img src="{{ hero_image }}" />
          </div>
          <div>
            <h3>{{ title }}</h3>
            <p class="meta"><i class="fa fa-calendar" aria-hidden="true"></i>{{ partial:date-meta }}</p>
            <p>{{ content | macro:summary }}</p>
          </div>
        </a>
      </li>
      {{ /entries }}
      </ul>
      {{ partial:pagination }}
    {{ /collection:blog-maker }}
  </section>

Instead of collection:blog-maker I like to put in a variable which is connected to the page so every artist has his/her blog on his/her page.

Answered by Peter Emil van den Berg! Go to answer.