1

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?

EDIT:

Here the both screenshots.

https://i.sstatic.net/RtgBB.jpg

https://i.sstatic.net/JomkJ.jpg

I hope that helps.

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

1 Answer 1

1

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 and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.