Sjabloon:Related portals: verschil tussen versies

Uit Auditpedia
Ga naar:navigatie, zoeken
 
(4 tussenliggende versies door dezelfde gebruiker niet weergegeven)
Regel 23: Regel 23:
 
{{Section title |Title= |Formlink new={{#widget:Button link |href=#related-portal-form-tab |datatoggle=tab |class=btn portal-button |buttontext={{Fa|edit}} {{int: ws-edit}}  }} }}<!-- end Section title -->
 
{{Section title |Title= |Formlink new={{#widget:Button link |href=#related-portal-form-tab |datatoggle=tab |class=btn portal-button |buttontext={{Fa|edit}} {{int: ws-edit}}  }} }}<!-- end Section title -->
 
{{#if: {{{Related portal|}}}  
 
{{#if: {{{Related portal|}}}  
| {{#arraymap:{{{Related portal|}}}|,|x|[[x]]}}
+
| {{#caamap:{{{Related portal|}}}|,|x|[[x]]}}
 
| }}
 
| }}
 
| {{#if: {{{Related portal|}}}  
 
| {{#if: {{{Related portal|}}}  
| {{#arraymap:{{{Related portal|}}}|,|x|[[x]]}}
+
| {{#caamap:{{{Related portal|}}}|,|x|[[x]]}}
 
| Geen gerelateerde portalen}}
 
| Geen gerelateerde portalen}}
 
}}
 
}}
Regel 36: Regel 36:
 
<wsedit target="{{PAGEID}}" template="Portal" formfield="Related portal" />
 
<wsedit target="{{PAGEID}}" template="Portal" formfield="Related portal" />
 
<wslabel>Enter related portals, separated by comma:</wslabel>
 
<wslabel>Enter related portals, separated by comma:</wslabel>
{{#arraydefine:$portals |{{#ask:[[Class::Portal]] |limit=999 |link=none |sort=Title }} }}
+
<wsfield type="textarea"  rows="1" class="form-control" name="Related portal" >{{{Related portal|}}}</wsfield>
{{#arraydefine:$portals selected |{{{Portal|}}} }}<!--
 
-->{{#arraydiff:$portals unselected |$portals |$portals selected}}<!--
 
--><wstoken id="portal-tokens" multiple required="required" name="Related portal[]" ><wsfield type="option" value=""/>
 
{{#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__}} |}}
 
</wstoken>
 
 
<div class="text-right mt-3">{{#widget:Button link |href=#related-portal-view-tab |datatoggle=tab |class=btn portal-button|buttontext={{int: ws-back}} }}
 
<div class="text-right mt-3">{{#widget:Button link |href=#related-portal-view-tab |datatoggle=tab |class=btn portal-button|buttontext={{int: ws-back}} }}
 
<wsfield type="submit" class="btn btn-primary-green" value="{{int: ws-save}}" /></div>
 
<wsfield type="submit" class="btn btn-primary-green" value="{{int: ws-save}}" /></div>

Huidige versie van 7 mrt 2022 om 16:38

This is the "Related portals" template. It should be called in the following format:

{{Related portals
|Title=
|Related portal=
}}

Edit the page to see the template text.