Use layout as reusable code component? #719
nicolasfranck
started this conversation in
Ideas
Replies: 1 comment 4 replies
-
This is entirely up to the developer. If you want to create layouts to be used like that you should to the following:
If you want to keep your templ file the same you can include your
I would recommend the first option though. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently layouts are used by child templates.
e.g.
But once compiled, I see no way to call the layout and supply a child templ.Component (so the other way around).
That would make components more "dynamically" reusable.
e.g. (doesn't work)
Beta Was this translation helpful? Give feedback.
All reactions