Template:Document format links

From PCSAR

(Difference between revisions)
Jump to: navigation, search
Current revision (02:03, 22 July 2019) (edit) (undo)
 
Line 1: Line 1:
-
<noinclude>{{documentation}}</noinclude><includeonly><!--
+
<noinclude>{{documentation}}</noinclude><includeonly><noinclude>
-
-->{{#if:{{{2|}}}|{{{2}}}{{~}}}}<!--
+
</noinclude><noinclude>
-
-->([[Media:{{{1}}}.pdf|download/print]]: [[:Image:{{{1}}}.pdf|.pdf]]<!--
+
</noinclude>{{#if: {{{b|}}}<noinclude>
-
-->{{#ifexist: Image:{{{1}}}.odt|<!--
+
</noinclude>|<noinclude>
-
--><nowiki></nowiki>; edit:<!--
+
;;; b= option included, use as both basename and description if
 +
;;; not separately specified.
-
--> [[:Image:{{{1}}}.odt|.odt]]<!--
+
</noinclude>{{Document format links/Core|Basename={{{b}}}|Description={{{1|{{{b}}}}}}}}<noinclude>
-
-->}}<!--
+
</noinclude>|<noinclude>
-
-->{{#ifexist: Image:{{{1}}}.odg|<!--
+
;;; b= not specified. Use first paramater as basename, second as
 +
;;; description.
-
--><nowiki></nowiki>; edit:<!--
+
</noinclude>{{Document format links/Core|Basename={{{1}}}|Description={{{2|}}}}}<noinclude>
-
--> [[:Image:{{{1}}}.odg|.odg]]<!--
 
-
-->}}<!--
+
</noinclude>}}<noinclude>
-
-->{{#ifexist: Image:{{{1}}}.odp|<!--
+
</noinclude></includeonly>
-
 
+
-
--><nowiki></nowiki>; edit:<!--
+
-
 
+
-
--> [[:Image:{{{1}}}.odp|.odp]]<!--
+
-
 
+
-
-->}}<!--
+
-
 
+
-
-->{{#ifexist: Image:{{{1}}}.ods|<!--
+
-
 
+
-
--><nowiki></nowiki>; edit:<!--
+
-
 
+
-
--> [[:Image:{{{1}}}.ods|.ods]]<!--
+
-
 
+
-
-->}}<!--
+
-
 
+
-
-->{{#ifexist: Image:{{{1}}}.rtf|<!--
+
-
 
+
-
--><nowiki></nowiki>; export: [[:Image:{{{1}}}.rtf|.rtf]]<!--
+
-
 
+
-
-->}}<!--
+
-
 
+
-
-->)<!--
+
-
 
+
-
--></includeonly>
+

Current revision

This is the documentation for the template Template:Document format links

Template:Document format links/Doc:

The template {{Document format links|[b=]basename|description}} produces links to a document in several formats.

[edit] Parameters

basename 
name excluding the "Image:", "File:" or "Media:" and excluding the file suffix.
b= 
(optional) if included, description will default to the same value.
description 
(optional) description to be included before links

[edit] Examples

You type... You get...
DocName {{document format links|Doc-103-individuals-log}} 
DocName (download/print: .pdf; edit: .odt; export: .rtf)
{{document format links|Doc-103-individuals-log|DocName}} 
DocName (download/print: .pdf; edit: .odt; export: .rtf)
{{document format links|b=Doc-103-individuals-log}} 
Doc-103-individuals-log (download/print: .pdf; edit: .odt; export: .rtf)
{{document format links|b=Doc-103-individuals-log|DocName}} 
DocName (download/print: .pdf; edit: .odt; export: .rtf)


[edit] Implementation

Helper templates:


To see how this template is implemented, edit this page and examine the portion between <includeonly> and </includeonly>.

Personal tools