Sjabloon:Portal form: verschil tussen versies
Uit Auditpedia
Label: Ongedaan maken |
Label: Ongedaan maken |
||
Regel 26: | Regel 26: | ||
<wslabel>Behoort tot portaal:</wslabel> | <wslabel>Behoort tot portaal:</wslabel> | ||
− | {{# | + | {{#cadefine:$portals |{{#ask:[[Class::Portal]] |limit=999 |link=none |sort=Title }} }} |
− | {{# | + | {{#cadefine:$portals selected |{{{Portal|}}} }} |
{{#arraydiff:$portals unselected |$portals |$portals selected}} | {{#arraydiff:$portals unselected |$portals |$portals selected}} | ||
{{#tag:wsselect | | {{#tag:wsselect | | ||
<wsfield type="option" value="">(geen)</wsfield> | <wsfield type="option" value="">(geen)</wsfield> | ||
− | {{# | + | {{#arraymap:{{#arrayprint:$portals selected}} |, |__Portal__|{{#tag:wsfield |{{#show:__Portal__ |?Title}} |type=option |value=__Portal__ |selected=selected}} |}} |
− | {{# | + | {{#arraymap:{{#arrayprint:$portals unselected}} |, |__Portal__|{{#tag:wsfield |{{#show:__Portal__ |?Title}} |type=option |value=__Portal__ }} |}} |
|name=Portal |class=form-control}}<!-- einde wsselect --><br> | |name=Portal |class=form-control}}<!-- einde wsselect --><br> | ||
Versie van 9 feb 2022 14:49
This is the Portal form template. It should be called in the following format:
{{Portal form |Page= < Optional, person page to edit > if empty, a new page is created |Portal= "Template:Portal" parameters: |Title= |Portal= }}