Template:LLink: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(display documentation, prot-temp, categorize in Templates)
(replaced template:Switch with parser function #if)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly> &nbsp; (&nbsp;{{switch|{{{1|}}}|case:= |default=[{{filepath:{{{1}}}}} {{pdf}}]&nbsp;}}{{switch|{{{2|}}}|case:= |default=[{{filepath:{{{2}}}}} {{mid}}]&nbsp;}}{{switch|{{{3|}}}|case:= |default=[{{filepath:{{{3}}}}} {{{4}}}]&nbsp;}}{{switch|{{{ext1|}}}|case:= |default=[http://{{{ext1}}}]&nbsp;}}{{switch|{{{ext2|}}}|case:= |default=[http://{{{ext2}}}]&nbsp;}}{{switch|{{{ext3|}}}|case:= |default=[http://{{{ext3}}}]&nbsp;}}{{switch|{{{ext4|}}}|case:= |default=[http://{{{ext4}}}]&nbsp;}}{{switch|{{{ext5|}}}|case:= |default=[http://{{{ext5}}}]&nbsp;}})</includeonly><noinclude>
<includeonly>&nbsp; ( {{#if:{{{1|}}}|[{{filepath:{{{1}}}}} {{pdf}}]&nbsp;}}{{#if:{{{2|}}}|[{{filepath:{{{2}}}}} {{ {{lc:{{#explode:{{{2|}}}|.|-1}}}} }}]&nbsp;}}{{#if:{{{3|}}}|[{{filepath:{{{3}}}}} {{{4}}}]&nbsp;}}{{#if:{{{ext1|}}}|[http://{{{ext1}}}]&nbsp;}}{{#if:{{{ext2|}}}|[http://{{{ext2}}}]&nbsp;}}{{#if:{{{ext3|}}}|[http://{{{ext3}}}]&nbsp;}}{{#if:{{{ext4|}}}|[http://{{{ext4}}}]&nbsp;}}{{#if:{{{ext5|}}}|[http://{{{ext5}}}]&nbsp;}}{{#if:{{{media|}}}|[[Media:{{{media}}}|{{{type}}}]]&nbsp;}})</includeonly><noinclude>
{{DisplayBox|text=
{{Doc|text=
Creates links with icons to local media (ie. "Image:") files hosted at CPDL.org.  
Creates links with icons to local media (ie. "Image:") files hosted at CPDL.org.  


Line 12: Line 12:


ext1-ext5 are optional parameters with links (without "http://") to any other local or external file, PLUS a space, PLUS the program name (Encore etc.) or an icon template, like {{extpdf}}
ext1-ext5 are optional parameters with links (without "http://") to any other local or external file, PLUS a space, PLUS the program name (Encore etc.) or an icon template, like {{extpdf}}
The parameters media=''filename'', type=''filetype'' may also be used to create a Mediawiki link of the form <nowiki>[[Media:</nowiki> ''filename'' <nowiki>|</nowiki> ''filetype'' <nowiki>]]</nowiki>. The type parameter must be plain text; using an icon breaks Mediawiki links.
}}
}}
<p>{{prot-temp}}</p>
<p>{{prot-temp}}</p>
[[Category:Templates]]
[[Category:Internal link templates]]
</noinclude>
</noinclude>

Latest revision as of 18:07, 16 June 2017


Documentation

Creates links with icons to local media (ie. "Image:") files hosted at CPDL.org.

1st optional parameter is the name (without "https://www.cpdl.org/wiki/images/x/xy/") of the local PDF file (eg. MyEdition.pdf, which is found at Image:MyEdition.pdf)

2nd optional parameter is the name (without "https://www.cpdl.org/wiki/images/x/xy/") of the local MID file (eg. MyEdition.mid, which is found at Image:MyEdition.mid)

3rd optional parameter is the name (without "https://www.cpdl.org/wiki/images/x/xy/") of the local source file (eg. MyEdition.enc,, which is found at Image:MyEdition.enc)

4th optional parameter is the program name (eg. Encore) or icon corresponding to the source file from the 3rd parameter.

ext1-ext5 are optional parameters with links (without "http://") to any other local or external file, PLUS a space, PLUS the program name (Encore etc.) or an icon template, like Icon_pdf_globe.gif

The parameters media=filename, type=filetype may also be used to create a Mediawiki link of the form [[Media: filename | filetype ]]. The type parameter must be plain text; using an icon breaks Mediawiki links.