This is more or less like how I did it. Dan, does this satisfy your needs?
On Mar 19, 11:37 am, Daniel <[email protected]> wrote: > Hi > I did already create table rows like you try to achive. > Your approach has one shortcoming. > You create always a whole new table in your template "TableRow", not > only one additional row of the main table. > At the end, it's quit simple. > > The templates should look like > > Template:TableHeader: > {| class="wikitable" > ! First Column > ! Second Column > ! Third Column > <!-- end of template --> > > Note, that the table closing bracket is missing here. For this you > need another template, maybe called Template:TableFooter. There you > have to place closing bracket of the table definition. > > Template:TableFooter: > <includeonly>|}</includeonly> > <!-- end of template --> > > In the template for the rows, you only have to make sure to create a > new row. > > Template:TableRow: > <includeonly>|- > | [[has first column::{{{FirstColumnValue|}}}]] > | [[has second column::{{{SecondColumnValue|}}}]] > | [[has third column::{{{ThirdColumnValue|}}}]]</includeonly> > <!-- end of template --> > > In the form, you call all this templates. > > Form:CreateTable: > {{{for template|TableHeader}}} > {| class="formtable" > |} > {{{end template}}} > > {{{for template|TableRow|multiple}}} > {| class="formtable" > | {{{field|FirstColumnValue}}} > | {{{field|SecondColumnValue}}} > | {{{field|ThirdColumnValue}}} > |} > {{{end template}}} > > {{{for template|TableFooter}}} > {| class="formtable" > |} > {{{end template}}} > > In the page created, the calls of all this templates result in > rendering one table with as many rows you added. > Page:Whatever > {{TableHeader}} > > {{TableRow > |FirstColumnValue=Value1 > |SecondColumnValue=Value2 > |ThirdColumnValue=Value3}} > > {{TableRow > |FirstColumnValue=Value4 > |SecondColumnValue=Value5 > |ThirdColumnValue=Value6 > > }} > {{TableFooter > }} > > -Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Semantic Forms" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/semantic-forms?hl=en -~----------~----~----~----~------~----~------~--~---
