Hi @rguy I may finally have understood your idea. What about this:
\define is_wrapped() yes
\define is_styled() yes
<$genesis $type={{{ [<is_wrapped>match[yes]then[section]] }}}
$names=" [<is_styled>match[yes]then[style]] [<is_wrapped>match[yes]then[inert]]"
$values="[<is_styled>match[yes]then[val1]] [<is_wrapped>match[yes]then[val2]] ">
This text only gets wrapped with a `<section>` element when the `is_wrapped` macro/variable is set to ''yes''.
</$genesis>
Note that this only works fully with the 5.2.6 prerelease: before this release, the $type
attribute cannot be set to a blank value. The transcluded filter for $type
returns nothing when <is_styled>
is not set to yes, while $names
and $values
filters also change their returned values depending of the value of <is_wrapped>
.