I have a website with main pages
- About
- Links
- Posts
About and Links are single pages, whereas Posts is list page which lists all posts. So my content folder structure is:
_index.md (About page, layout is manually set to single)
links/
index.md (Links page)
posts/
_index.md (Posts index page)
post1/
index.md
post2/
index.md
post3/
index.md
I have a page layout for the “normal” website, i.e. for these 3 pages. The layout is stored in the layout folder as follows:
_default/
baseof.html
single.html
list.html
The single.html
template is intended for the “About” and “Links” pages, and the list.html
template is intended for the “Posts” index page.
Now I want the actual posts (post1, post2, post3) to look very different (no menu etc.). That’s why I have a special layout for them, making my layout folder actually look like:
_default/
baseof.html
single.html
list.html
posts/
baseof.html
single.html
The problem, as you might have realized already, is, that now my “Posts” index page uses the posts/baseof.html
. However, as explained, as it is part of the “main” website, I want it to use the templates from _default/
.
What is the cleanest way to do that? I think that should be common problem. (Often you want the pages of a page bundle to look different than the index page.)