Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create dynamic template feature #161

Open
tpmccallum opened this issue Mar 1, 2023 · 4 comments
Open

Create dynamic template feature #161

tpmccallum opened this issue Mar 1, 2023 · 4 comments
Labels
discussion A discussion to consider all options before arriving at a solution. enhancement New feature or request

Comments

@tpmccallum
Copy link
Contributor

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.

@karthik2804
Copy link
Contributor

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

@tpmccallum
Copy link
Contributor Author

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
Copy link
Contributor Author

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 tpmccallum added the discussion A discussion to consider all options before arriving at a solution. label Mar 1, 2023
@tpmccallum
Copy link
Contributor Author

This has been resolved via PR #616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion A discussion to consider all options before arriving at a solution. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants