Open balupton opened 11 years ago
Would be great if we could have splitting happening at the layout level, in addition to just documents.
For instance we have the document src/documents/index.html that has:
src/documents/index.html
--- layout: page title: "Index" --- Welcome
Then we have the layout src/layouts/page.html.eco that has:
src/layouts/page.html.eco
--- layout: default --- <article> <h1><%- @document.title %></h1> <div><%- @content %></div> </article>
Then we have the layout src/layouts/default.html.eco that has:
src/layouts/default.html.eco
<html> <head> <title><%- @document.title %></article> </head> <body> <%- @content %> </body> </html>
Now say we want to split off at the page level, so we should be able to update src/layouts/page.html.eco with:
--- layout: default additionalLayouts: ['data'] --- <article> <h1><%- @document.title %></h1> <div><%- @content %></div> </article>
Good idea.
Let me see how easily I can make it happen
Interesting, would solve the problem of having to inject additionalLayouts in the document models.
additionalLayouts
Would be great if we could have splitting happening at the layout level, in addition to just documents.
For instance we have the document
src/documents/index.html
that has:Then we have the layout
src/layouts/page.html.eco
that has:Then we have the layout
src/layouts/default.html.eco
that has:Now say we want to split off at the page level, so we should be able to update
src/layouts/page.html.eco
with: