Template:Code/doc: Difference between revisions
>Rusty.perrin (Remove mediawiki link) |
m (Text replacement - "Powerpedia" to "Saintapedia") |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
The intent of this template is that {{Code|{{tlx|Code|<wikicode>}}}} results in the same thing as the rather less elegant {{code|<nowiki><code><nowiki><wikicode></nowiki></code></nowiki>}}. | The intent of this template is that {{Code|{{tlx|Code|<wikicode>}}}} results in the same thing as the rather less elegant {{code|<nowiki><code><nowiki><wikicode></nowiki></code></nowiki>}}. | ||
However, the wikipedia version of this template ({{W|Template:Code}}) relies on an extension that is not currently installed on | However, the wikipedia version of this template ({{W|Template:Code}}) 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 {{Tag|nowiki}} tags if you do not want the wikicode to be interpreted. So the end result is {{Code|{{tlx|Code|<nowiki><nowiki><wikicode></nowiki></nowiki>}}}} (resulting in {{Code|<nowiki><wikicode></nowiki>}}), which is less elegant that the intended use of the template, but perhaps not quite as bad as the no-template alternative. | ||
==Usage== | ==Usage== |
Latest revision as of 20:45, 16 September 2024
This is a documentation subpage for Template:Code
(see that page for the template itself). It contains usage information, categories, and other content that is not part of the original template page. |
|
The intent of this template is that <code>{{[[Template:Code|Code]]|<wikicode>}}</code>
results in the same thing as the rather less elegant <code><nowiki><wikicode></nowiki></code>
.
However, the wikipedia version of this template (Template:Code) 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]]|<nowiki><wikicode></nowiki>}}</code>
(resulting in <wikicode>
), 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]]|<nowiki>'''Bold'''</nowiki>}}</code>
|
'''Bold'''
|
<code>{{[[Template:Code|Code]]|'''Bold'''}}</code>
|
'''Bold'''
|