I create a code for TV show database, but I have a big problem. Please see the image I want to access one entry(post) with some data from some templates. But I don't know how to create any code or settings in the sections area.

Any advice or give me the url if there is another topic?

image enter image description here

  • 4
    Maybe it's me, but this reads like gibberish. Please clean up your question first and make it a bit more clear for us to understad what you're trying to do. Jan 30 '17 at 14:04
  • 1
    I agree with @TomDeSmet... it's very hard to tell what you are describing & asking in this question. Please rewrite it to be more coherent, and use code formatting where appropriate.
    – Lindsey D
    Jan 30 '17 at 23:35
  • Sorry for my non-native English writing. So I want to display the different page by 2 templates like _entry.html like news. I want to share the entries News. The craft displays the different pages by/from index.html but the _entry.html by {slug} on setting the channel/structure doesn't display. Right? I will modify my questions and add the images later. Feb 1 '17 at 0:35

This makes more sense :)

So basically, you want to have info from one entry on multiple pages and your problem is that in the section settings, you can only define 1 template for an entry.

One way to go about this is to create your own urls when clicking on an entry where you add the {slug} of your entry to the url, something like this: {siteUrl}/episode-guide/recap/{entry.slug}

You can create a dynamic route for this url that takes you to (for example) the recap.html template. Here you just get the last segment (being the slug) and retrieve the correct entry from your database and show only the recap info.

{% set entrySlug = craft.request.lastSegment() %}
{% set entry = craft.entries.section("sectionName").slug(entrySlug) %}

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.