Difference between revisions of "Template:Doc"
(Add |content= support) |
m (Replaced 20px image icon with emoji that will scale correctly for various displays and be better for screen reader users) |
||
Line 2: | Line 2: | ||
-->{{#if:{{{content|}}}||<div style="float:right;padding-right:1em;"> <span class=plainlinks style="font-size:11px"> | -->{{#if:{{{content|}}}||<div style="float:right;padding-right:1em;"> <span class=plainlinks style="font-size:11px"> | ||
− | [[[{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|view]]] [[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=edit}} edit]] [[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=history}} history]] [[{{fullurl:{{FULLPAGENAMEE}}/Documentation|action=purge}} refresh]]</span></div>}}<span style="font-size:11pt;line-height:11pt;"> | + | [[[{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|view]]] [[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=edit}} edit]] [[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=history}} history]] [[{{fullurl:{{FULLPAGENAMEE}}/Documentation|action=purge}} refresh]]</span></div>}}<span style="font-size:11pt;line-height:11pt;">📚 Documentation</span> |
---- | ---- | ||
{{#if:{{{content|}}}|{{{content}}}|{{#if: {{{1|}}}|{{:{{{1}}}}}|{{{{SUBJECTPAGENAME}}/Documentation}}}}}}</div></includeonly><noinclude> | {{#if:{{{content|}}}|{{{content}}}|{{#if: {{{1|}}}|{{:{{{1}}}}}|{{{{SUBJECTPAGENAME}}/Documentation}}}}}}</div></includeonly><noinclude> |
Revision as of 09:55, 15 November 2019
📚 Documentation
This is my documentation
Adds documentation for the template.
Parameters
Normally (when called with no parameters), creates a documentation box and transcludes the contents of a /Documentation subpage of the current page as its contents.
{{doc|pagename}}
— The first unnamed parameter can be set to a pagename to transclude the contents of pagename instead of the /Documentation subpage.
|content=Documentation content
- Optional: If set, display the provided content formatted as documentation, rather than transcluding the documentation from another page. Suppresses view/edit/history/purge links.
Example
This documentation box is an example of itself.
This wikicode:
{{doc|content=This is my documentation}}
results in
[view] [edit] [history] [refresh]
📚 Documentation
This is my documentation