Difference between revisions of "Template:Tbl-init"

From PC-BSD Wiki
Jump to: navigation, search
(try fix)
 
(94 intermediate revisions by one user not shown)
Line 1: Line 1:
<includeonly>{|class="spiffy_table" style="margin-left:{{{margin-left|12px}}}; margin-right:{{{margin-right|12px}}}; margin-top:{{{margin-top|10px}}}; margin-bottom:{{{margin-bottom|10px}}}; {{{other|}}}" width="{{{width|97%}}}" align="{{{align|center}}}"
+
<includeonly><onlyinclude>{|class="{{{class|spiffy_table}}}" style="margin-left:{{{margin-left|10px}}}; margin-right:{{{margin-right|10px}}}; margin-top:{{{margin-top|10px}}}; margin-bottom:{{{margin-bottom|10px}}}; {{{other|}}}" width="{{{width|97%}}}" align="{{{align|center}}}"
<caption style="text-align: left">{{#if: {{{caption|}}}|'''Table {{{caption}}}'''|}} {{{{#if: {{{caption|}}}|GroupList|null}}|group=tables|txt={{#if: {{{caption|}}}|Table {{{caption}}}|}}|url={{FULLPAGENAME}}}}</caption>[[category:Uses Tbl-init]]</includeonly><noinclude>  
+
|+ {{putCommon|28}}{{{caption|{{:template:tbl-init/msg}}}}} <span class="GroupListItem">{{ {{#if: {{{caption|}}}|GroupRef|zero}}|1={{putCommon|19}}|txt={{putCommon|28}}{{{caption|Needs descriptor}}}|url={{FULLPAGENAME}} }}</span></onlyinclude></includeonly><noinclude>
 
===Usage===
 
===Usage===
{{highlight|text='''<nowiki>{{</nowiki>tbl-init{{pipe}}''align='''center''{{pipe}}'''caption='''''1a. The caption'''''<nowiki>}}</nowiki>'''}}<br>'''<nowiki>{{</nowiki>tbl-title{{pipe}}'''''column title'''''<nowiki>}}</nowiki><br>{{pipe}}-'''<br>'''<nowiki>{{</nowiki>tbl-cell{{pipe}}row='''''1''{{pipe}}''The content'''''<nowiki>}}</nowiki>'''<br>'''{{pipe}}-<br><nowiki>{{</nowiki>tbl-cell{{pipe}}row='''''2''{{pipe}}''The content'''''<nowiki>}}</nowiki><br>{{pipe}}<nowiki>}</nowiki>'''
+
{{highlight|text='''<nowiki>{{</nowiki>tbl-init{{!}}''align='''center''{{!}}'''caption='''''a. is the caption'''''<nowiki>}}</nowiki>'''}}{{br}}'''!'''''column title''
: Also place a total of exactly one '''<nowiki><</nowiki>noinclude><nowiki>{{GroupListHeading|group=tables}}</nowiki><nowiki></</nowiki>noinclude>''' at the bottom of the page, below any existing <nowiki><</nowiki>noinclude><nowiki>{{refheading}}</nowiki><nowiki></</nowiki>noinclude> and above the category links section.
+
{{br}}'''{{pipe}}-'''
 +
{{br}}'''{{pipe}}'''''Content of first row''
 +
{{br}}'''{{pipe}}-'''
 +
{{br}}'''{{pipe}}'''''Content of second row''
 +
{{br}}'''{{pipe}}-'''
 +
{{br}}'''{{pipe}}'''''and so on and so forth''
 +
{{br}}'''{{pipe}}<nowiki>}</nowiki>'''
 +
 
 +
Also place a total of exactly one '''{{vtag|noinclude}}{{ttag|GroupRefHeading{{!}}{{ttag|putCommon{{!}}19}}}}{{vtag|/noinclude}}''' at the bottom of the page, below any existing {{vtag|noinclude}}{{ttag|refheading}}{{vtag|/noinclude}} and above the category links section.
  
 
===Result===
 
===Result===
{{tbl-init|align=center|caption=1a. The caption}}
+
No feedback is given when everything seems to be done correctly:
{{tbl-title|column title}}
+
 
 +
{{tbl-init|caption=a. is the caption}}
 +
!column title
 
|-
 
|-
{{tbl-cell|row=1|The content}}
+
|Content of first row
 
|-
 
|-
{{tbl-cell|row=2|The content}}
+
|Content of second row
 +
|-
 +
|and so on and so forth
 
|}
 
|}
 +
 +
 +
However, captions are now a mandatory element which will result in a reminder:
 +
 +
{{tbl-init}}
 +
!column title
 +
|-
 +
|Content of first row
 +
|-
 +
|Content of second row
 +
|-
 +
|and so on and so forth
 +
|}
 +
 +
And a listing is separate from the tables, intended to be placed at the bottom of the page:
 +
 +
{{groupRefHeading|{{putCommon|19}}}}
 
[[category:templates]]
 
[[category:templates]]
{{GroupListHeading|group=tables}}
+
[[category:Uses Tbl-init]]
</noinclude><!-- there must be nothing - not even a space after this comment -->
+
</noinclude>

Latest revision as of 01:23, 17 March 2015

[edit] Usage

{{tbl-init|align=center|caption=a. is the caption}}
!column title
|-
|Content of first row
|-
|Content of second row
|-
|and so on and so forth
|}

Also place a total of exactly one <noinclude>{{GroupRefHeading|{{putCommon|19}}}}</noinclude> at the bottom of the page, below any existing <noinclude>{{refheading}}</noinclude> and above the category links section.

[edit] Result

No feedback is given when everything seems to be done correctly:

Table  Is there no version? a. is the caption [Tables 1]
column title
Content of first row
Content of second row
and so on and so forth


However, captions are now a mandatory element which will result in a reminder:

Table  Is there no version? needs a caption: {{tbl-init|caption=a. is the caption}}
column title
Content of first row
Content of second row
and so on and so forth

And a listing is separate from the tables, intended to be placed at the bottom of the page:

Tables

  1. Table  Is there no version? a. is the caption
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox