Difference between revisions of "Template talk:Cmduser"

From ThinkWiki
Jump to: navigation, search
 
m
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
If I use something like <nowiki>{{cmduser|./configure foo=bar bix=baz}}</nowiki>, the page displays only <nowiki>{{{1}}}</nowiki>.
 
If I use something like <nowiki>{{cmduser|./configure foo=bar bix=baz}}</nowiki>, the page displays only <nowiki>{{{1}}}</nowiki>.
 
--[[User:Zhenech|Zhenech]] 12:44, 18 February 2007 (CET)
 
--[[User:Zhenech|Zhenech]] 12:44, 18 February 2007 (CET)
 +
 +
 +
----
 +
3 possible solutions
 +
 +
Wikipedia suggests for Templates
 +
 +
'''NR='''somecode with = here
 +
 +
where NR is the Number of the Parameter passed
 +
 +
i.e.
 +
 +
<nowiki>{{cmduser|</nowiki>'''1='''<nowiki>./configure foo=bar bix=baz}}</nowiki>
 +
 +
<nowiki>{{sometemplate|</nowiki>'''1='''<nowiki>./configure foo=bar bix=baz|</nowiki>'''2='''<nowiki>foobarit=Stone that cannot be recognized anymore}}</nowiki>
 +
 +
 +
wrap a nowiki around it like
 +
 +
<nowiki>{{cmduser|</nowiki>'''&#60;nowiki&#62;'''./configure foo=bar bix=baz'''&#60;/nowiki&#62;'''<nowiki>}}</nowiki>
 +
 +
 +
or use the html ascii version for the escaped chars:
 +
 +
'''&#38;#61;''' for &#61;
 +
 +
'''&#38;#124;''' for &#124;
 +
 +
or in the case of cmduser: we could integrate the nowiki thing in the template
 +
 +
--[[User:Mcgiver|Mcgiver]] 16:43, 18 February 2007 (CET)

Latest revision as of 17:56, 18 February 2007

Template breaks on lines with =

If I use something like {{cmduser|./configure foo=bar bix=baz}}, the page displays only {{{1}}}. --Zhenech 12:44, 18 February 2007 (CET)



3 possible solutions

Wikipedia suggests for Templates

NR=somecode with = here

where NR is the Number of the Parameter passed

i.e.

{{cmduser|1=./configure foo=bar bix=baz}}

{{sometemplate|1=./configure foo=bar bix=baz|2=foobarit=Stone that cannot be recognized anymore}}


wrap a nowiki around it like

{{cmduser|<nowiki>./configure foo=bar bix=baz</nowiki>}}


or use the html ascii version for the escaped chars:

&#61; for =

&#124; for |

or in the case of cmduser: we could integrate the nowiki thing in the template

--Mcgiver 16:43, 18 February 2007 (CET)