SingePageTemplate查找顺序
文章目录
单页面模板查找顺序要注意section, type属性的关系, section属性由content目录下面的结构决定的, type属性总是会有一个值, 没有明确设置的而内容页面又在section tree下的时候其值为section属性的值, 如果没有明确设置内容页面又没有在section tree下时,type的值为page
section下单页面模板的查找顺序
1 2 3 4 |
layouts/section的值/layout的值.html layouts/section的值/single.html layouts/_default/single.html |
非section下单页面模板的查找顺序
1 2 3 4 |
layouts/page/layout的值.html layouts/page/single.html //type的默认值 layouts/_default/single.html |
设置了type属性的单页面模板的查找顺序
1 2 3 4 |
layouts/type的值/layout的值.html layouts/type的值/single.html layouts/_default/single.html |
文章作者 Suroppo
上次更新 2019-11-04