Jump to content

Template:Code/doc: Difference between revisions

m
Text replacement - "Saintapedia" to "USApedia"
m (Text replacement - "Powerpedia" to "Saintapedia")
m (Text replacement - "Saintapedia" to "USApedia")
 
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>&lt;code>&lt;nowiki><wikicode>&lt;/nowiki>&lt;/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>&lt;code>&lt;nowiki><wikicode>&lt;/nowiki>&lt;/code></nowiki>}}.  


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>&lt;nowiki><wikicode>&lt;/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.
However, the wikipedia version of this template ({{W|Template:Code}}) relies on an extension that is not currently installed on USApedia, 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>&lt;nowiki><wikicode>&lt;/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==