PC Gaming Shelter
An archive dedicated to preserving PC Gaming history and more

Template:Link fields: Difference between revisions

From PC Gaming Shelter
Created page with "<includeonly><!-- -->{{form row |{{{field <!-- -->{{!}} URL <!-- -->{{!}} input type=text <!-- -->{{!}} class=form-control <!-- -->}}} |label=URL |property=Has URL }}<!-- -->{{form row |{{{field <!-- -->{{!}} Link text <!-- -->{{!}} input type=text <!-- -->{{!}} class=form-control <!-- -->}}} |label=Link text |property=Has link text }}<!-- -->{{{field <!-- -->{{!}} Link group <!-- -->{{!}} default={{{1|}}} <!-- -->{{!}} hidden <!-- -->}}}</includeonly><no..."
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 25: Line 25:
  -->{{!}} default={{{1|}}} <!--
  -->{{!}} default={{{1|}}} <!--
  -->{{!}} hidden <!--
  -->{{!}} hidden <!--
  -->}}}</includeonly><noinclude>
  -->}}}<!--
 
-->{{#ifeq: {{{1|}}}|Download links|{{form row
|{{{field <!--
-->{{!}} File size <!--
-->{{!}} input type=year <!--
-->{{!}} placeholder=0M <!--
-->{{!}} class=form-control <!--
-->}}}
|label=File size
|property=Has file size
}}
}}
</includeonly><noinclude>
{{{{PAGENAME}}/doc}}
{{{{PAGENAME}}/doc}}
</noinclude>
</noinclude>

Latest revision as of 19:22, 17 June 2026

Creates a set of reusable field definitions for PageForms in pair with Template:Link and its aliases. It is to be used in the form annotations, usually is a multiple instance template. The first unnamed parameter will be used as a value for the link group (Property:Belongs to group).

Fields

  • URL
  • Link text
  • Link group
  • File size (for Download links)

Example

{{{for template|Event link|multiple|embed in field=Event[Event links]|add button text=Add event link}}}
{{Link fields|Event links}}
{{{end template}}}

where:

  • Event link — name of the alias to Template:Link.
  • Event[Event links] — names of the parent template (Event) and the field that holds instances of a multi-instance template (Event links).
  • Event links — name of a group the link belongs to.