You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often partials use a param called class and are nested. In that case, I don't want to use the parent class data in a nested partial that doesn't receive class itself:
{{# The parent partial receives a class. #}}
{{ partial:parentclass="some-class" }}
{{# @name Parent @param class Custom CSS classes.#}}{{# No class passed to the child. #}}
<div:$class>
{{ partial:child }}
</div>
{{# @name Child @param class Custom CSS classes.#}}{{# Since class is null, the Cascade would look upwards until it finds class data. #}}
<div:$class>
I am a child.
</div>
My solution here was to use view:class. The nested partial doesn't receive the parent's class data anymore. I don't know if this is the intended use case (besides that).
I would either add this as a "best practice" (like in the linked docs article) to the Data Inheritance docs page or another solution that might be better.
The text was updated successfully, but these errors were encountered:
Often partials use a param called
class
and are nested. In that case, I don't want to use the parentclass
data in a nested partial that doesn't receiveclass
itself:My solution here was to use
view:class
. The nested partial doesn't receive the parent's class data anymore. I don't know if this is the intended use case (besides that).I would either add this as a "best practice" (like in the linked docs article) to the Data Inheritance docs page or another solution that might be better.
The text was updated successfully, but these errors were encountered: