Skip to content
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

Open
bep opened this issue Jun 30, 2018 · 3 comments
Open

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

bep opened this issue Jun 30, 2018 · 3 comments
Assignees
Milestone

Comments

@bep
Copy link
Member

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/_index.md:

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/article.md 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 this to the v0.43 milestone Jun 30, 2018
@bep bep self-assigned this Jun 30, 2018
@bep bep closed this as completed in c790029 Jun 30, 2018
@bep
Copy link
Member Author

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
Will have to test and evaluate this a little.

See  #4891
@bep
Copy link
Member Author

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.

@bep bep modified the milestones: v0.43, v0.44 Jul 9, 2018
@bep bep modified the milestones: v0.44, v0.45 Jul 12, 2018
@bep bep modified the milestones: v0.45, v0.46 Jul 23, 2018
@bep bep modified the milestones: v0.46, v0.47, v0.48 Aug 3, 2018
@bep bep modified the milestones: v0.48, v0.49 Aug 22, 2018
@bep bep modified the milestones: v0.49, v0.50 Sep 13, 2018
@bep bep modified the milestones: v0.50, v0.51 Oct 6, 2018
@bep bep modified the milestones: v0.51, v0.53 Nov 8, 2018
@bep bep modified the milestones: v0.53, v0.54 Dec 6, 2018
@bep bep modified the milestones: v0.114.0, v0.115.0 Jun 13, 2023
@bep bep modified the milestones: v0.115.0, v0.116.0 Jun 30, 2023
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@bep bep modified the milestones: v0.119.0, v0.120.0 Oct 4, 2023
@bep bep modified the milestones: v0.120.0, v0.121.0 Oct 31, 2023
@bep bep modified the milestones: v0.121.0, v0.122.0 Dec 6, 2023
@bep bep modified the milestones: v0.122.0, v0.123.0, v0.124.0 Jan 27, 2024
@bep bep modified the milestones: v0.124.0, v0.125.0 Mar 4, 2024
@bep bep modified the milestones: v0.125.0, v0.126.0 Apr 23, 2024
@bep bep modified the milestones: v0.126.0, v0.127.0 May 15, 2024
@bep bep modified the milestones: v0.127.0, v0.128.0 Jun 8, 2024
@bep bep modified the milestones: v0.128.0, v0.129.0 Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant