New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout lookup should consider root and current section's type if set #4891

bep opened this Issue Jun 30, 2018 · 2 comments


None yet
1 participant

bep commented Jun 30, 2018

You can currently set

type: pretty
layout: two-colums

In every content page, list and single pages. Which makes it flexible. But if you take the base layouts into account, it is hard to create a couple of reusable templates that can be applied to new sections on demand (without creating duplicates):

If I set this in news/

type: "3-column"

Then I want that type to be in the template lookup order (before the most general ones) for both that section and other pages in that section.

This means that if I create news/ I don't have to do something extra to get that "3-column" layout.

This behaviour matches what we do with the section today, but this will make it more flexible.

So we add

  • The current section's type if set
  • The root section's type if set

In that order.

@bep bep added the Enhancement label Jun 30, 2018

@bep bep added this to the v0.43 milestone Jun 30, 2018

@bep bep self-assigned this Jun 30, 2018

@bep bep closed this in c790029 Jun 30, 2018


This comment has been minimized.


bep commented Jun 30, 2018

I need to reconsider/refine this one, so I'll reopen to remind me.

@bep bep reopened this Jun 30, 2018

bep added a commit that referenced this issue Jun 30, 2018

Restrict the new type layout resolution to page and section kinds
Will have to test and evaluate this a little.

See  #4891

This comment has been minimized.


bep commented Jun 30, 2018

I have enabled this for page + section right now. Will have to think about this a little bit. Testing it and it wasn't that powerful as I hoped -- but that is because of the baseof resolution. I will create another issue for that.

Note to self: For taxonomies, make sure this does not resolve to list.html in the type override folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment