0
I'd like to add some HTML code to all pages of a MediaWiki website,
for that I've installed the Widgets extension by documentation,
I understand that I should create the widget code as a wiki page and then call it with the {{#widget}}
parser function,
but I miss what are the parameters there in call as it's just HTML I call to insert between <head></head>
:
{{#widget:WidgetName|param1=value1|param2=value2}}
What are these parameters and wouldn't it be easier to add some custom JavaScript to add the HTML to each webpage?
The parameters are explained just a little below where your link points to. – Jasper – 2019-04-10T06:32:55.677
param=value pairs are the settable parameters, defined within the widget code
= what they use for?All parameters passed to a widget are converted into Smarty parameters.
What they use for? I think this is the only indirect explanation I found:Important: Use escape modifiers on all passed-in parameters to prevent users from passing in raw HTML from normal wiki pages. Failure to protect against this will expose the hosting site to XSS (and other) attacks.
: They hold "pieces" of HTML. – JohnDoea – 2019-04-10T06:52:34.687