bartholomew icon indicating copy to clipboard operation
bartholomew copied to clipboard

Create dynamic template feature

Open tpmccallum opened this issue 1 year ago • 4 comments

At present, each .md file can only have one static .hbs file referenced in the frontmatter.

It would be great to have dynamic templates instead of hard-coded templates, per .md file.

See this link in developer docs for more information.

tpmccallum avatar Mar 01 '23 00:03 tpmccallum

How would the template be specified dynamically? One of the ways I can imagine is through request parameters.

karthik2804 avatar Mar 01 '23 00:03 karthik2804

That is what I was also thinking; if a user clicks on a link from a page in the site that uses a specific template i.e. after clicking they arrive at a new page (from template_1.hbs). No matter what page they have just landed on, the arrival at the new page is rendered using that same template_1.hbs (and not the .hbs that is typed into the frontmatter).

tpmccallum avatar Mar 01 '23 00:03 tpmccallum

If leaving the original hard-coded .hbs template name in the frontmatter is possible (as part of this upgrade) then this would be a really quick update for the developer documentation (would not have to update every .md files frontmatter). But I understand if each .md needs to have a dynamic value in place of that original hard-coded value. Still thinking at this stage so any ideas are welcome :)

tpmccallum avatar Mar 01 '23 00:03 tpmccallum

This has been resolved via PR #616

tpmccallum avatar Jun 29 '23 04:06 tpmccallum