HI, I am trying some interesting uses of custom widgets, namely to call procedures. The idea is to allow the content of the widget to be passed into the procedure as a variable, either the body, or fill/slots in the widget. Providing an easier way to pass in a block of wiki text into a procedure.
- I can wikify the text="""<$slot $name=“ts-raw”/>""" with type=html to pass this content onto a subsequent procedure call.
The question
Would it be difficult to provide a method, within custom widgets, to set some variables to the content of the widget / slots (without wikification) including the ts-raw slot but also other named slots? defined using the $fill widget?
- At the moment we are restricted to use slots within the custom widget but if we could set variables with a slots content, we could easily pass it on to other widgets or procedures.
- You can see above I can already do this through wikify, because this is the only case I can find of answering with a yes Is there a way to provide the output of a widget as an attribute value? via a wikify variable.
- However here I am asking for something simpler, don’t even render it.
Some possible approaches
- A raw output on the wikify widget?
- the ability to set a variable to a slot name in the parameters widget?
- make the content of the slots available as a variable within custom widgets
What do you think?