Template:DocLink: Difference between revisions

From CTMS
m (Minor formatting change)
Tag: Reverted
(Updated)
 
(7 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>
This is achieved with
{
<nowiki>{{DocLink|MyPage}}</nowiki>
"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": {
Example:
"1": {
{{DocLink|Main Page}}
"label": "Page name",
 
"type": "wiki-page-name",
</noinclude><includeonly><!--<span style="align-items: center;appearance: none;background-color: #fff;border-radius: 24px;border-style: none;box-sizing: border-box;color: #3c4043;cursor: pointer;display: inline-flex;fill: currentcolor;font-family: &quot;Google Sans&quot;, Roboto, Arial, sans-serif;font-weight: 500;height: 1.2em;justify-content: center;letter-spacing: .25px;line-height: normal;max-width: 100%;overflow: visible;padding: 0.1em 0.5em;position: relative;text-align: center;transition: box-shadow 280ms cubic-bezier(.4, 0, .2, 1), opacity 15ms linear 30ms, transform 270ms cubic-bezier(0, 0, .2, 1) 0ms;width: auto;z-index: 0;box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px;">[{{fullurl:{{{1}}}}}?action=pdfbook&amp;format=singlebook&amp;notitle DOC]</span>--><span style="background-image: url(/calidus-assist/MTS/skins/Timeless/resources/images/page-misc-grey.svg?806ed);border: 0;background-color: transparent;background-repeat: no-repeat;background-position: left top;display: inline-block;margin-bottom: -0.35em;padding: 0 2px 0 20px;">[{{fullurl:{{{1}}}}}?action=pdfbook&amp;format=singlebook&amp;notitle DOC]</span></includeonly>
"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&amp;format=singlebook&amp;notitle|&amp;action=pdfbook&amp;format=singlebook&amp;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}}

Template parameters

ParameterDescriptionTypeStatus
Page name1

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 namerequired
Doc Description2

If not provided, this DocLink will simply show "DOC", otherwise the text provided here.

Stringoptional

Examples: