Base Template lookup order not working, hard to trace issues

#1

As a new user it is so hard to understand and trace issues with base template order. It is a blackbox.

I have a section called pages and a page called about.md
/content/pages/about.md

I have tried numerous attempts at following the order precedence detailed here

I have tried
/themes/mytheme/layouts/section/pages-baseof.html
/themes/mytheme/layouts/pages/baseof.html
/themes/mytheme/layouts/section/baseof.html
/themes/mytheme/layouts/_default/pages-baseof.html

None are ever applied and it always falls back to
/themes/mytheme/layouts/_default/baseof.html

It would really help if there could be some verbose output, something like:
…checking for base template /layouts/section/pages-baseof.html…not found
…checking for base template /themes/mytheme/layouts/section/posts-baseof.html…not found
…checking for base template /layouts/posts/baseof.html…not found
[etc]
…checking for base template /themes/mytheme/layouts/_default/baseof.html…found!

0 Likes

#2

Where is the main layout file located? E.g. single.html or similar?

0 Likes

#3

The documentation does not mention the requirement for the single.html, list.html, etc templates to also reside at the same folder as the base template you wish to be applied. Even if the single.html, etc is just a copy of what is at _default. Once these are copied from _default the base template lookup order works as documented.

0 Likes