Difference between revisions of "Template:Tbl-init"

From PC-BSD Wiki
Jump to: navigation, search
(fix odd extra space, the nbsp should have been necessary but is not.)
 
(60 intermediate revisions by one user not shown)
Line 1: Line 1:
<includeonly>{|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}}}"
+
<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}}}"
|+ {{#if: {{{caption|}}}|Table {{{caption}}}|}} <span class="groupListItem" >{{{{#if: {{{caption|}}}|GroupList|null}}|group=tables|txt={{#if: {{{caption|}}}|Table {{{caption}}}|}}|url={{FULLPAGENAME}}</span>}}[[category:Uses Tbl-init]]</includeonly><noinclude>  
+
|+ {{#if: {{{caption|}}}|{{putCommon|28}}{{{caption}}}|Please provide a caption: {{greytxt|txt='''<nowiki>{{</nowiki>tbl-init{{pipe}}'''caption='''''a. is the caption'''''<nowiki>}}</nowiki>'''}}}} <span class="GroupListItem" >{{{{#if: {{{caption|}}}|GroupRef|null}}|1={{putCommon|19}}|txt={{#if: {{{caption|}}}|{{putCommon|28}}{{{caption|}}}|Needs descriptor}}|url={{FULLPAGENAME}}}}</span> [[category:Uses Tbl-init]]</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{{pipe}}''align='''center''{{pipe}}'''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 <nowiki><</nowiki>noinclude><nowiki>{{refheading}}</nowiki><nowiki></</nowiki>noinclude> and above the category links section.
  
 
===Result===
 
===Result===
{{tbl-init|caption=1a. The caption}}
+
No feedback is given when everything seems to be done correctly:
 +
 
 +
{{tbl-init|caption=a. is the caption}}
 
!column title
 
!column title
 
|-
 
|-
|The content
+
|Content of first row
 
|-
 
|-
|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}}
+
</noinclude>
</noinclude><!-- there must be nothing - not even a space after this comment -->
+

Latest revision as of 22:20, 20 February 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:

Please provide 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. [[Template:Tbl-init|Table  Is there no version? a. is the caption]]
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox