Difference between revisions of "Template:Doc"

From GodWiki
Jump to: navigation, search
(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">
  
&#91;[[{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|view]]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=edit}} edit]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=history}} history]&#93;&nbsp;&#91;[{{fullurl:{{FULLPAGENAMEE}}/Documentation|action=purge}} refresh]&#93;</span></div>}}<span style="font-size:11pt;line-height:11pt;">[[Image:Doc.png|20px|Documentation]] &nbsp;Documentation</span>
+
&#91;[[{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|view]]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=edit}} edit]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=history}} history]&#93;&nbsp;&#91;[{{fullurl:{{FULLPAGENAMEE}}/Documentation|action=purge}} refresh]&#93;</span></div>}}<span style="font-size:11pt;line-height:11pt;">📚&nbsp;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

[view] [edit] [history] [refresh]
📚 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