I created a new Single section and named it "test", added some content and tried to view it on domain.com/test. Unfortunately I get my default server 404 and not the new single section.

I tried to add a new route using "test" => "_layout" but can't see any change.

Do you have any idea why this isn't working?


Here the both screenshots.



I hope that helps.

  • 1
    Could you share screenshots of your section settings and entry type settings for your "test" single section? Sep 14 '16 at 14:55

You will need to add a template called test.html that extends the "_layout.html" template. The layout template is just a wrapper template, and with the "_" in front of it, it will always be invisible to a browser.

Take a look at the twig references on extending templates. Also look at the templates supplied with the initial install to get a better idea how this works.

Twig Extend

Routes are for more refined routing of templates and you should not need a route for current implementation.

Imagine if "_layout.html" were named "_wrapper.html" and it makes a little more sense.

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.