The template for the table works fine, well what I see is what i expected to see. It's getting the rows added to the table that causing the frustration. It could be that I am way off and making this much more difficult than it needs to be!
Eventually I want to be able to create a table with a variable number of rows...but just trying to get even basics to work.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Question
Guest Rick
Very new to wiki 'stuff' and I hope this is the right place to ask:
I'm trying to create a template for tables, and a template for rows. Here's what I have so far:
{{Template:Table
|class=wikitable|sortable=sortable|collapsible=mw-collapsible|collapsed=mw-collapsed|style_center="text-align: center;"
|caption_style="text-align: left; width: 200px"|caption=Table 1
|header1=My Header1|header2=My Header2|header3=My Header3|header4=My Header4
}}
Template:Table
{| class="{{{class}}} {{{sortable}}} {{{collapsible}}} {{{collapsed}}}" style={{{style_center}}}
|+style={{{caption_style}}}|{{{caption}}}
! scope="col" | {{{header1}}} !! scope="col" | {{{header2}}} !! scope="col" | {{{header3}}} !! scope="col" | {{{header4}}}
|-
|{{Template:Table_Row| cell_value1 = Row 1 Cell 1}}
|}
Template:Table_Row
{|
|data-sort-value="{{{cell_value1}}}"|[[{{{cell_value1}}}]]
|}
The template for the table works fine, well what I see is what i expected to see. It's getting the rows added to the table that causing the frustration. It could be that I am way off and making this much more difficult than it needs to be!
Eventually I want to be able to create a table with a variable number of rows...but just trying to get even basics to work.
Thanks very much in advance!
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.