Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow use of variables in section settings’ "Template" field (like "Entry URI Format") #5351
When creating a Channel or Structure section, it would be useful if we could use variables in the "Template" field(s) below "Site Settings", just like we can in the "Entry URI Format" field(s). For instance, I would like to load a different template based on the entry's type, so I would do it like this:
But right now I get the following error message when visiting the URL of an entry in that section:
I know I can achieve the same effect by pointing to a single template that includes a different template based on the
Thanks for considering :)
I’d do this right away, but rendering object templates like those is a little expensive, so not something you want to do on every request. We’d need to start prerendering the templates and storing them for each entry/site when entries are saved. We can look into that when we get to #2450.