I am trying to make a template that contains a table.
The trick is that I'm trying to inline a variable to the template to send in variable table rows.
So far I've had no luck with my syntax and any suggestions would be welcome...
Thanks -Andrei
The following works:
Template:BaseTable {| ! Head1 ! Head2 |- {{additionalRowTemp}} {{additionalRowTemp}} | line2-c1 | line2-c2 |}
---------
Template:additonalRowTemp | foo-c1 | foo-c2 |-
-=-=-=-=-=-=
The Goal is to do:
{{BaseTable | additionalRow= {{additionalRowTemp | c1=foo | c2=bar}} {{additionalRowTemp | c1=baz | c2=zot}} }}
---------
Template:BaseTable {| ! Head1 ! Head2 |- {{{additionalRow}}} | line2-c1 | line2-c2 |}
---------
Template: additionalRowTemp {| | {{{var1}}} | {{{var2}}} |+ }
Andrei Freeman: Software Project Management, Engineering and Web Hosting at: Apolo Productions andrei.freeman@mac.com | aim://lordandrei | lj://afreeman
The trick is that I'm trying to inline a variable to the template to send in variable table rows.
Not sure if this is what you need, but here's my OptionalTableRow template:
{{ #if: {{{2|}}} | {{!}} '''{{{1}}}''': {{!}}{{!}} {{{2}}} {{!}}- }}<noinclude> == Usage ==
<pre> {{OptionalTableRow|designation|value}} </pre> [[Category:Templates]] </noinclude>
You will need the "pipe template"; the need for this is described at Meta: http://meta.wikimedia.org/wiki/Template:%21 In fact, this might be the reason why your approach didn't work... !?
-- F.
Frederik,
Implementing the pipe template seems to have been the key. Thank you very much.
-Andrei
Andrei Freeman: Software Project Management, Engineering and Web Hosting at: Apolo Productions andrei.freeman@mac.com | aim://lordandrei | lj://afreeman
On Jun 27, 2007, at 9:22 AM, Frederik Dohr wrote:
The trick is that I'm trying to inline a variable to the template to send in variable table rows.
Not sure if this is what you need, but here's my OptionalTableRow template:
{{ #if: {{{2|}}} | {{!}} '''{{{1}}}''': {{!}}{{!}} {{{2}}} {{!}}- }}<noinclude> == Usage == <pre> {{OptionalTableRow|designation|value}} </pre> [[Category:Templates]] </noinclude>
You will need the "pipe template"; the need for this is described at Meta: http://meta.wikimedia.org/wiki/Template:%21 In fact, this might be the reason why your approach didn't work... !?
-- F.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org