Template:Code/doc

From Saintapedia
Jump to navigation Jump to search
Template:Code on Wikipedia

The intent of this template is that <code>{{[[Template:Code|Code]]&#124;<wikicode>}}</code> results in the same thing as the rather less elegant &lt;code&gt;&lt;nowiki&gt;&lt;wikicode&gt;&lt;/nowiki&gt;&lt;/code&gt;.

However, the wikipedia version of this template (Template:CodeWikipedia Logo.png) relies on an extension that is not currently installed on Saintapedia, and so it doesn't work when directly ported over. A substitute without using that extension requires that the wikicode be entered inside <nowiki>...</nowiki> tags if you do not want the wikicode to be interpreted. So the end result is <code>{{[[Template:Code|Code]]&#124;&lt;nowiki&gt;&lt;wikicode&gt;&lt;/nowiki&gt;}}</code> (resulting in &lt;wikicode&gt;), which is less elegant that the intended use of the template, but perhaps not quite as bad as the no-template alternative.

Usage

Markup Result
<code>{{[[Template:Code|Code]]&#124;&lt;nowiki&gt;'''Bold'''&lt;/nowiki&gt;}}</code> '''Bold'''
<code>{{[[Template:Code|Code]]&#124;'''Bold'''}}</code> '''Bold'''