Thanks for your reply.
I agree with you that the distributed mediawiki 's parse does not treat {{{para}}} within the {{template}} call as a para.
But the paser, wikipedia.org used does treat the {{{para}}} within the {{template}} call as a para.
Can someone share the info of {{{para}}} within the {{template}} call as a para. Or how to modify my parser to do that. Thanks jc
Message: 4 Date: Thu, 17 Nov 2005 17:28:16 -0800 From: Joshua Yeidel yeidel@wsu.edu Subject: Re: [Mediawiki-l] yeidel@wsu.edu To: mediawiki list mediawiki-l@Wikimedia.org Message-ID: BFA26E30.12F42%yeidel@wsu.edu Content-Type: text/plain; charset="US-ASCII"
On 11/17/05 4:26 PM, "judi chen" judi_chen@yahoo.com wrote:
Thanks for the reply.
Is this the problem? Mediawiki should treat {{{parameter}}} as the parameter not part of the {{ template }}
How to fix this problem thanks
You _intend_ for Mediawiki to treat "{{{1}}}" as a parameter value, and not as part of the template call, but it's not clear to me that it _should_ do that.
The notation "{{{1}}}" is used in a template _body_ as a placeholder for a parameter value that will be passed in a template _call_. You are using it as a parameter value within a template call, which (it seems) was not anticipated by the people who coded the parser.
Have you tried:
{{t2|<nowiki>{{{1}}}</nowiki>|a}}
This might prevent the interpretation of the "}}" as closing the template call.
-- Joshua
Message: 7 Date: Thu, 17 Nov 2005 10:46:22 -0800 From: Joshua Yeidel yeidel@wsu.edu Subject: Re: [Mediawiki-l] template problem, donot understand {{{name}}} To: mediawiki list mediawiki-l@Wikimedia.org Message-ID: BFA20FFE.12EE0%yeidel@wsu.edu Content-Type: text/plain; charset="US-ASCII"
"{{" begins the template "call". It is ended by the first occurrence of "}}" -- in your case, immediately after "1". Everything after "1}}" is treated as plain text.
-- Joshua
On 11/16/05 7:39 PM, "judi chen"
wrote:
Hi, Thanks for the reply. Here is my problem.
I have a template: t2 with the following code start-{{{1}}}-middle-{{{2}}}-end
An if I do {{t2|{{{1}}}|a}} to call the Template:t2
I suppose to get this as output, start-{{{1}}}-middle-a-end
But rather I got this on my wiki
start-{{{1-middle-{{{2}}}-end}|a}}
That is my problem
Any suggestions thanks jc
Yahoo! FareChase: Search multiple travel sites in
one click.
http://farechase.yahoo.com _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
__________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs
On 11/18/05, judi chen judi_chen@yahoo.com wrote:
Thanks for your reply.
I agree with you that the distributed mediawiki 's parse does not treat {{{para}}} within the {{template}} call as a para.
But the paser, wikipedia.org used does treat the {{{para}}} within the {{template}} call as a para.
Can someone share the info of {{{para}}} within the {{template}} call as a para. Or how to modify my parser to do that. Thanks jc
Message: 4 Date: Thu, 17 Nov 2005 17:28:16 -0800 From: Joshua Yeidel yeidel@wsu.edu Subject: Re: [Mediawiki-l] yeidel@wsu.edu To: mediawiki list mediawiki-l@Wikimedia.org Message-ID: BFA26E30.12F42%yeidel@wsu.edu Content-Type: text/plain; charset="US-ASCII"
On 11/17/05 4:26 PM, "judi chen" judi_chen@yahoo.com wrote:
Thanks for the reply.
Is this the problem? Mediawiki should treat {{{parameter}}} as the parameter not part of the {{ template }}
How to fix this problem thanks
You _intend_ for Mediawiki to treat "{{{1}}}" as a parameter value, and not as part of the template call, but it's not clear to me that it _should_ do that.
The notation "{{{1}}}" is used in a template _body_ as a placeholder for a parameter value that will be passed in a template _call_. You are using it as a parameter value within a template call, which (it seems) was not anticipated by the people who coded the parser.
Have you tried:
{{t2|<nowiki>{{{1}}}</nowiki>|a}}
This might prevent the interpretation of the "}}" as closing the template call.
-- Joshua
Message: 7 Date: Thu, 17 Nov 2005 10:46:22 -0800 From: Joshua Yeidel yeidel@wsu.edu Subject: Re: [Mediawiki-l] template problem, donot understand {{{name}}} To: mediawiki list mediawiki-l@Wikimedia.org Message-ID: BFA20FFE.12EE0%yeidel@wsu.edu Content-Type: text/plain; charset="US-ASCII"
"{{" begins the template "call". It is ended by the first occurrence of "}}" -- in your case, immediately after "1". Everything after "1}}" is treated as plain text.
-- Joshua
On 11/16/05 7:39 PM, "judi chen"
wrote:
Hi, Thanks for the reply. Here is my problem.
I have a template: t2 with the following code start-{{{1}}}-middle-{{{2}}}-end
An if I do {{t2|{{{1}}}|a}} to call the Template:t2
I suppose to get this as output, start-{{{1}}}-middle-a-end
But rather I got this on my wiki
start-{{{1-middle-{{{2}}}-end}|a}}
That is my problem
Any suggestions thanks jc
It seems to me that you might be confused about the syntax for invoking a template (the m:Help:Template pages calls the text used to invoke a template a tag) vs. the syntax within the template itself.
To expand the template T2 we use {{T2}} (or {{t2}} since the normal capitalize the first character of a title rule appllies), and if we want to pass a positional parameter we use {{t2|parm1}}
INSIDE a template {{{1}}} will expand to the first positional parameter (assuming one was passed, see below). When a TEMPLATE is being parsed, those triple brace bracketted strings will be seen as tags to "invoke" the parameters.
OUTSIDE a template {{{1}}} has no special meaning, it's just text.
The template T2 as you give it expects two parameters. What you are seeing is the effect of passing it less than two parameters.
If a parameter is NOT passed to a template then {{{n}}} (where n is 1, 2 etc) will simply output {{{n}}}. Try these invocations of Template:T2
{{t2|a|b}} -> start-a-middle-b-end
{{t2|a}} -> start-a-middle-{{{2}}}-end because no second parameter was passed.
{{t2}} -> start-{{{1}}}-middle-{{{2}}}-end
Now if we have:
{{t2|{{{1}}}|anything...}}
outside of a template, the parser sees the {{ as the start of an invocation of a template. Everything up to the next occurence of }} is the invocation, so the template invocation is
{{t2|{{{1}}
Which passes ONE parameter with the VALUE "{{{1". T2 then produces (the following with line breaks and commentary added:
start- // text from the template {{{1 // this is the expansion of the first actual positional parameter -middle-{{{2}}}-end // text from the template
The last {{{2}}} comes out unchanged since no actual second positional parameter was passed.
The rest of what you see: |{{{2}}}
is just text from the article which invoked T2.
-- Rick DeNatale
Visit the Project Mercury Wiki Site http://www.mercuryspacecraft.com/
mediawiki-l@lists.wikimedia.org