I want to show a single content entry (from one content type) on a page and I want to access this page directly with a link.
So far I've created the content type "posts" (with wagon generate ...). It contains the fields "title","date" and "body". On the page "posts", all title's of the posts are listed and when you click on one of the title, you should be redirected to the subpage "post" which contains the rest of the content (depending on which post you selected).
posts.liquid:
{% extends parent %}
{% block main %}
{% for post in contents.posts%}
<a href="/{{ post._slug }}"><li>{{ post.date }} - {{ post.titel }} </li></a>
{% endfor %}
{% endblock %}
This lists all posts.
post.liquid:
{% extends parent %}
{% block main %}
<h2>{{post.title}}</h2>
<h3>{{post.date}}</h3>
<p>{{post.body}}</p>
{% endblock %}
And this shoul be the template for the rest of the content on a single page.
How can I link the list elemnts to the correct post? I'm using wagon to develop the site local.