Open babarogic opened 4 years ago
@babarogic i needed this solution today, and i figured it out.
This way it works for me on windows environment:
pageLayouts: { 'product': 'product', 'product\\folder2': 'product', 'product\\folder3': 'product', 'kontakt': 'kontakt' }
@kolejakjozef Awesome! Here is another solution, in html pages, just call this on the beginning and it will use the layout you assignee to
---
layout: name-of-layout
---
Help: How can you create two partials directories?
.pipe(panini({
...
partials: srcRoot + appDir + '/components/',
partials: srcRoot + appDir + '/modules/',
...
}))
For example: if in the partials folder, place the components and modules folders. A problem arises when the html file has the same name in both folders.
@TolyanDimov as i can see, you can't because https://github.com/foundation/panini/blob/develop/lib/loadPartials.js#L11 loadPartials function apply only one directory
How to achieve with panini to put specific layout for specific pages/folders. For now i achieved to point as in documentation provided folder blog to blog layout. But panini does not goes deeper and points layout to other folders inside folders. How to achieve that?
It goes something like this but not successful
folder2 and folder3 are pointed to defauly layout rather not to product layout