Cannot apply data in custom template

Hi there.

Im trying to retrieve certain posts in an specific template.

My routes.yaml looks like this:

    data: page.tos
    template: tos
    data: page.privacy
    template: privacy
    data: page.about
    template: about
    template: case-studies
    data: tag.casestudies

    permalink: /{slug}/
    template: index

  tag: /tag/{slug}/
  author: /author/{slug}/

And im trying to call the information in my template like this:

{{#foreach "posts"}}
<section class="case-studies-posts">
    <h1 style="color:black">{{title}}</h1>

The template itself is being display but not the content.

The templates with the works fine.

Any suggestions?

Thank you!

Solved it with controllers

1 Like