Further use of $params with $parameters widget

I will just add I have prior history in this space Clarification on the use of hashmap(s)

A quick Illustration of what my suggested solution would look like;

\widget $my.widget()
<$parameters filter="[all[current]]" $params=all-params>

   <$list params=<<all-params>>/>
   <$transclude $variable=myproc params=<<all-params>>/>

</$parameters>
\end $my.widget

<$my.widget filter="filter" emptyMessage="message"/>
  • In this case any parameters provided to my.Widget would be passed on as if they were spelt out fto the
    • list widget.
    • myproc would also receive these
\procedure myproc()
<$parameters $params=all-params>
   <$transclude $variable=my2nd-proc params=<<all-params>>/>
</$parameters>
\end

<<myproc p1:"value" p2:"value">>
OR
<$transclude $variable=myproc p1="value" p2="value"/>
  • In these examples the arbitrary parameter value pairs used to call myproc, would be passed on to my2nd-proc
  • The same could work for macros/procedures and even inside transclusions
2 Likes