[Mediawiki-l] Templating TableRows?

Andrei Freeman andrei.freeman at mac.com
Wed Jun 27 16:15:56 UTC 2007


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 at mac.com | aim://lordandrei | lj://afreeman



More information about the MediaWiki-l mailing list