V4: Page Templates ( AKA Parent Pages, Master pages ) Proposal #4589
Closed
dbolack-ab
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Core concepts:
A Page Template may have will have a default markup along or right and left markups for use in aternating pages.pagediv element. This container is classedTemplate-page page.pageis the document/theme default, ensuring baseline styling.columwrapperdiv element. This container is classedTemplate-default default.defaultis the document/theme default, ensuring baseline styling.:oddpseudo selectors should be used with the assumption that the default is also:even.\pagedeclaration. eg: `\page Chapter1 {page-settings}.{{ }}declarations which will be prepended to any added for the page.Weaponshas{--chapterColor:orange}and page is invoked as\page Orange {--chapterColor2: red}the combined mustache would be{--chapterColor:orange,--chapterColor2: red}. This will allow for pages to override Template Page defaults.{{}}blocks with the first elementbeing the container type name ( paper, text, other custom name. )_Changes required:
template-pageorpageclasses as appropriate.paperwhen appropriate.Rendering Restructure
This will slightly complicate our current rendering flow for a single page.
a. If no template is declared, walk backward in document to last used template
b. If no template is found in a, walk inheritance tree to last defined Default ( page, theme, theme-parent1... ) which should ultimately end at the Blank theme's Default.
a. If none are found, wrap the page in the text container.
b. Merge containers in the page definition and the filter. Classes and content from the template insert ahead of the page definition.
c. Expand and substitute container name into class names in
{{}}definition.i.
paperbecomestemplate-paper paperii.
textbecomestemplate-text textiii. etc.
What does this look like for users
A note about names
I chose Page Templates as the concept term here as it fits more in the names used with the Word processors frame of reference more of our users would be familiair with than the Master Page or Parent Page names that are more common with DTP. I'm not hugely married to that, if someone has a better idea.
Similarly, the container names for the
.pageand.columnWrapperanalogues.Beta Was this translation helpful? Give feedback.
All reactions