Given the following, if background_video_type is active for scope of content_section, it still cascades through to the next scope content_row_css. This means background_video_type is still true/valid for the content_row, even if it isn't.
Therefore I should scope it, however, I cannot scope partial variables if you plan on using them in more than one scope.
Describe the solution you'd like
I have found a solution to this, see below, however I'd like to see (in v3) the following option.
{{ partial:settings/section_class is_scoped='true' }} or {{ partial:settings/section_class is_scoped='content_section' }}.
is_scoped='true' would automatically scope the partials variables to the last/parent scope.
is_scoped='content_section' would define a scope the partials variables should use.
Describe alternatives you've considered
I have a solution for the current build, however it isn't elegant and involves creating more arrays/variables to serve the data.
{{ if data:background_video_type }}videobg{{ /if }}
Unfortunately, for this solution, it's all in. There is no sprinkle of it here and there, I need to commit to every partial variable requiring a scope.
When cascading, reused partials are difficult to scope. Given the following example, I'd like to use the same partial for 3 areas in my template.
Pages Template
Text Layout Partial
Section Class Partial
Content Row Class Partial
Background Video Partial
Given the following, if
background_video_type
is active for scope ofcontent_section
, it still cascades through to the next scopecontent_row_css
. This meansbackground_video_type
is still true/valid for thecontent_row
, even if it isn't.Therefore I should scope it, however, I cannot scope partial variables if you plan on using them in more than one scope.
Describe the solution you'd like I have found a solution to this, see below, however I'd like to see (in v3) the following option.
{{ partial:settings/section_class is_scoped='true' }}
or{{ partial:settings/section_class is_scoped='content_section' }}
.is_scoped='true'
would automatically scope the partials variables to the last/parent scope.is_scoped='content_section'
would define a scope the partials variables should use.Describe alternatives you've considered I have a solution for the current build, however it isn't elegant and involves creating more arrays/variables to serve the data.
{{ partial:settings/section_class :data='content_section' }}
.Section Class Partial
Background Video Partial
Unfortunately, for this solution, it's all in. There is no sprinkle of it here and there, I need to commit to every partial variable requiring a scope.