Request

Assign Template In HTML File

  • Pages and Templates
The ability to assign templates on page. Possibly a special line in the head.
Then one would be able to assign templates to pages uploaded with FTP, in the HTML instead of assigning them after upload.



For example 11ty uses something like this. They have a head section on pages delimited by three “—”

i.e.
---
layout: mainlayout.html
---

Or perhaps we want to stick with a liquid syntax and not introduce a new syntax:
{% layout="manlayout.html" %}
(or something like that)

The benefits of using this would be:

allow developers to assign templates in their IDE and make updates to website. Allow pages to backed up with the template assignment. If a page was uploaded from a backup then the template assignment would be intact. For backwards compatibility, would imagine that having the layout in the page would be optional. If a layout was declared on a page, it would take precedence. If the layout was updated in the admin then if there was a layout declared on the page, then it the layout declaration on the page would be updated. If there was no layout declared on the page then layouts would work ad they do now and get assigned in the admin.