Template:Nb block: Difference between revisions
TeslaRaptor (talk | contribs) m (1 revision) |
TeslaRaptor (talk | contribs) m (2 revisions) |
(No difference)
|
Revision as of 13:58, 6 July 2009
name? | group? | cell? |
Documentation
File:Mbox documentationpage.png |
Documentation transcluded
The documentation for this template is transcluded from Template:Nb block/doc.
To edit it, please edit the transcluded page.
|
Block row for use in Template:Nb main.
Usage
{{nb block|name=blockname|groups=# of groups within block, including block itself|first subgroup|first content}} Optional: groupalign/align1=text alignment for the left/group cell; possible values: center, left or right (defaults to center if not specified) cellalign/align2=text alignment for the right/content cell; possible values: center, left or right (defaults to left if not specified) blockalign=text alignment for the right/content cell; possible values: center, left or right (defaults to center if not specified)
Can be used in conjunction with Template:Nb group, Template:Nb row and Template:Nb header - simply place additional rows you want to be in the block behind the block row and set the number of rows in the block (in total, block row counts as first row in block). The rows within the block should have inblock=yes specified to avoid display issues on some browsers.
Examples
Simple example
{{nb block|name=block|groups=2|group #1|content #1}} {{nb group|inblock=yes|group #2|content #2}}
results in:
block | group #1 | content #1 |
group #2 | content #2 |
Simple example with alignments
{{nb block|name=block|groups=2|blockalign=right|groupalign=left|cellalign=right|group #1|content #1}} {{nb group|inblock=yes|group #2|content #2}}
results in:
block | group #1 | content #1 |
group #2 | content #2 |
Note that the alignments only affect the block field and the content/group of the first row; you have to set group/cell alignments for the following cells seperately.
Mixed example
{{nb row|content outside the block}} {{nb block|name=block|groups=3|group #1|content #1}} {{nb row|inblock=yes|content #2}} {{nb group|inblock=yes|group #3|content #3}} {{nb group|group outside the block|content outside the block}}
results in:
content outside the block | ||
block | group #1 | content #1 |
content #2 | ||
group #3 | content #3 | |
group outside the block | content outside the block |