You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
right now, this produces "partials: p1 + p2, variables: + "
need a way to produce "partials: p1 + p2, variables: {{v1}} + {{v2}}"
proposed syntax:
h.registerPartial("header", header_tpl)
h.registerPartial("footer", footer_tpl)
var assembled_page_tpl = h.assemblePartials(page_tpl)
h.compile(assembled_page_tpl)(data)
What difference will this method make:
right now, render-entry-point is the "content_tpl", which references the layout it use, this can become repetitive if you have a lot of pages
with assemblePartials(), the render-entry-point is the outer page, this means sub-templates do not need to reference the parent, this is more logical
Here is an example folder structure
You can arrange a convention based template assembling logic in your project, which also support specific folder layout/partials to override the general layout/partials, in the above folder structure, legal/terms + privacy will use the following without specifying layout in template:
right now, this produces "
partials: p1 + p2, variables: +
"need a way to produce "
partials: p1 + p2, variables: {{v1}} + {{v2}}
"proposed syntax:
What difference will this method make:
Here is an example folder structure
![image](https://user-images.githubusercontent.com/1065882/147085960-7f0faf6b-4e36-4965-832a-b0f80ea8dac0.png)
You can arrange a convention based template assembling logic in your project, which also support specific folder layout/partials to override the general layout/partials, in the above folder structure,
legal/terms + privacy
will use the following without specifying layout in template:The text was updated successfully, but these errors were encountered: