Rick, Thanks for your time.
My problem is that my wiki site using those three templates to automate the portal creation process. So I have three exact same templates.
In my first template, I have a <div> to open a box and in my third template I have a </div> to close this box.
But my wiki 1.5.2 did not recognize the </div> in the third template. So the display box is above the content of the second template. And at the display rendering of the third template has a </div> at the end.
Also can you explain to me why you use 01 and 10 when you tried to explain nesting level. Thanks jc
Message: 7 Date: Mon, 21 Nov 2005 20:53:41 -0500 From: Rick DeNatale rick.denatale@gmail.com Subject: Re: [Mediawiki-l] TEMPLATE To: MediaWiki announcements and site admin list mediawiki-l@wikimedia.org Message-ID:
deb2337a0511211753o37a9f626y36787477a8ba1a00@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1
On 11/21/05, judi chen judi_chen@yahoo.com wrote:
HI ALL,
The reason I am asking so many question about this issue is because I try to simulate the following.
Please refer to page on http://en.wikipedia.org/w/index.php/Portal:Game
The code is as following,
{{/box-header|Sports and games portal|Wikipedia:Wikiportal/Sports and
games/Intro|}}
{{Wikipedia:Wikiportal/Sports and games/Intro}} {{/box-footer|}}
the code for {{/box-header|Sports and games portal|Wikipedia:Wikiportal/Sports and
games/Intro|}}
is as
http://en.wikipedia.org/w/index.php/Wikipedia:Wikiportal/box-header
Except that to code fragment you quoted above does NOT call that template, it calls the template Portal:Sports_and_games/box-header which is a sub-page of the Portal:Sports_and_games template.
That {{/box-header means that it's a sub-page relative to the current page.
http://en.wikipedia.org/w/index.php?title=Portal:Sports_and_games/box-header...
Note how this subpage template maps the positional arguments into keyword arguments with it calls the general Portal:box-header template.
which creates a box.
Then the second template
{{Wikipedia:Wikiportal/Sports
and games/Intro}} 's content automatically goes into the box created by the first template.
The first template only starts the box, by emitting the header and opening a <div> for the borders, and the third one (also a sub-page) closes this div.
There is no nesting of templates involved here, as you can see if you look at tne nesting level of each brace:
{{/box-header|Sports and games 01 portal|Wikipedia:Wikiportal/Sports and games/Intro|}}
10 {{Wikipedia:Wikiportal/Sports and games/Intro}} 01
10 {{/box-footer|}} 01 10
-- Rick DeNatale
__________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
On 11/23/05, judi chen judi_chen@yahoo.com wrote:
Rick, Thanks for your time.
My problem is that my wiki site using those three templates to automate the portal creation process. So I have three exact same templates.
My point is that there are more than three templates. {{/box-header ...}} is NOT referring to
Wikiportal/box-header
The / means that it's a sub-page of the current page so it's really referring to Portal:Sports_and_games/box-header which is an entirely different template.
Similarly {{/box-footer ...}} refers to Portal:Sports_and_games/box-footer
So if your portal page is called Xxx:Yyy then you need a template called Xxx:Yyy/box-header which would be based on Portal:Sports_and_games/box-header
and similarly for Xxx:Yyy/box-footer
In my first template, I have a <div> to open a box and in my third template I have a </div> to close this box.
But my wiki 1.5.2 did not recognize the </div> in the third template. So the display box is above the content of the second template. And at the display rendering of the third template has a </div> at the end.
Also can you explain to me why you use 01 and 10 when you tried to explain nesting level.
It's something which old Lisp programmers do to match up opening and closing parentheses, but applied here to braces {} The digit represents the nesting level before an opening brace is encountered, or after a closing brace is encountered. So
{{/box-header|Sports and games 01
Means we are now inside two braces (or at nesting level 2
portal|Wikipedia:Wikiportal/Sports and games/Intro|}} 10
Means that the first closing brace took us out to nesting level 1 and the second to level 0 (i.e. no unmatched braces.
-- Rick DeNatale
Visit the Project Mercury Wiki Site http://www.mercuryspacecraft.com/
mediawiki-l@lists.wikimedia.org