I'm setting up a Statamic site in which my client can create pages and mount collections to that pages. Site is still in local development.

I currently have two pages: training and consultancy. These are children pages of the page services.

There are also two collections: training services and consultancy services.

As you'd expect, training services is mounted to the page training and consultancy services is mounted to the page consultancy.

On the homepage I have the following code:

{{ pages from="/services" }}

<div class="services-area">
  {{ title }}

  // Here I would like to show two or three entries from the mounted collection.

  <a href="{{ url }}">All services in {{ title }}</a>
</div>

{{ /pages }}


So. What I would like to do but don't know how — I'd like to show two or three entries from the collection that is mounted to the page.

This piece of code renders two "services-area" divs and I know how to pull the data from the pages, but not how to pull the data from the collections that are mounted to the pages.

Answered by Kaz van Kooten! Go to answer.