Template:DocLink: Difference between revisions
From CTMS
Tag: Undo |
(Updated) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This is a template to create a link to a PDF document export for a particular page. | [[Category:Templates|{{PAGENAME}}]] | ||
<templatedata> | |||
{ | |||
<nowiki>{{DocLink| | "description": "This is a template to create a link to a PDF document export for a particular page. \n\nThis is achieved with {{DocLink|MyPage}}", | ||
"params": { | |||
"1": { | |||
{{DocLink|Main Page}} | "label": "Page name", | ||
"type": "wiki-page-name", | |||
</noinclude><includeonly><span | "required": true, | ||
"description": "The name of the page that the document will be produced from. Can also be the name of a category by specifying the Category namespace e.g. Did You Know, or Category:Accounts" | |||
}, | |||
"2": { | |||
"label": "Doc Description", | |||
"description": "If not provided, this DocLink will simply show \"DOC\", otherwise the text provided here.", | |||
"type": "string" | |||
} | |||
}, | |||
"paramOrder": [ | |||
"1", | |||
"2" | |||
] | |||
} | |||
</templatedata> | |||
Examples: | |||
* <code><nowiki>{{DocLink|Main Page}}</nowiki></code> - {{DocLink|MainPage}} | |||
* <code><nowiki>{{DocLink|Main Page|The Main Page in PDF form}}</nowiki></code> - {{DocLink|MainPage|The Main Page in PDF form}} | |||
</noinclude><includeonly><span class="apt-doclink">[{{fullurl:{{{1}}}}}{{#ifeq:{{#pos:{{fullurl:{{{1}}}}}|?|1}}||?action=pdfbook&format=singlebook&notitle|&action=pdfbook&format=singlebook&notitle}} {{{2|DOC}}}]</span></includeonly> |
Latest revision as of 15:55, 22 July 2025
This is a template to create a link to a PDF document export for a particular page. This is achieved with {{DocLink|MyPage}}
Parameter | Description | Type | Status | |
---|---|---|---|---|
Page name | 1 | The name of the page that the document will be produced from. Can also be the name of a category by specifying the Category namespace e.g. Did You Know, or Category:Accounts | Page name | required |
Doc Description | 2 | If not provided, this DocLink will simply show "DOC", otherwise the text provided here. | String | optional |
Examples:
{{DocLink|Main Page}}
- DOC{{DocLink|Main Page|The Main Page in PDF form}}
- The Main Page in PDF form