Closed ellmetha closed 3 months ago
This is required for clean code, and I like the proposed solution.
In order to encourage clean code in Marten projects by default, I recommend to set the default to true
in a future version (1-2 releases later).
Description
Let's make it possible to include template snippets/partials by explicitly stating whether the current template context should be made available to the included template or not through the use of new
contextual
andisolated
tag modifiers.For example:
Additionally, a new
templates.isolated_included_templates
setting should also be introduced in order to let developers choose whether or not included templates receive the current context by default (the default value of this setting should befalse
in order to ensure we don't introduce a backward-incompatible behavior).