Replies: 2 comments
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@brandonkelly Makes sense, thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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
entry.type.handle
, but I would like to avoid that{% include %}
if possible (not sure if it adds any overhead at all, but just from a clean code perspective).Thanks for considering :)
Beta Was this translation helpful? Give feedback.
All reactions