Wikipedia:Userboxes/Grouping

From Wikipedia, the free encyclopedia

Contents

[edit] Grouping userboxes

[edit] Using the Userboxtop template

Example 1
This user is a member of WikiProject Userboxes.
This user is interested in ancient Rome.
This user wants to be your friend.

As with the Babel box, there is a box to group userboxes together. Just make a list of userboxes with {{Userboxtop|box-name}} at the top, followed by your list of userboxes, and {{Userboxbottom}} at the bottom. For example, the box to the right is created using the following list:

{{Userboxtop |Example 1}}
{{Wikipedia:WikiProject Userboxes/Userbox}}
{{User:UBX/Rome}}
{{User:Nihiltres/Userboxes/Friendly}}
{{Userboxbottom}}

[edit] Using the boxboxtop template

If you wish an expandable list of userboxes you may try:

{{boxboxtop|Example2}} <BR> <div class="NavFrame" style="padding:0;border-style:none;"><br /> <div class="NavFrame" style="border-style:none;padding:0;"><br /> <div class="NavHead" style="background:#EDF1F1;text-align:left;text-style:normal"><br /> Caption</div><div class="NavContent" style="display:none;"><br /> </tt><i>Place your userboxes here...</i><tt><br /> </div></div></div><br /> {{boxboxbottom}}

(Of course you can put more than one such section inside a userbox, see Example 2 at right.)

Example2

You may also change the alignment by using 'right' or 'left' as the second parameter, or explicitly using parameter align. Thus, it is possible to create the same box on the right, but positioned on the left side of the page, by changing the first line from {{Userboxtop |Example 1}} to {{Userboxtop |Example 1|left}}.

[edit] Using the Babel grouping system

Similar results can be achieved with either of the following:

{{Babel-X |header=Example 1 |footer= |align=left |Wikipedia:WikiProject Userboxes/Userbox |Rome |:Nihiltres/Userboxes/Friendly}}

{{UBX-X |header=Example 1 |Wikipedia:WikiProject Userboxes/Userbox |Rome |:Nihiltres/Userboxes/Friendly}}

The older Babel grouping system can also be used, e.g. {{Babel-3|sv|no-4|rome}}. However, it only works for user boxes with the "User" prefix, which must then be dropped for the arguments. Also, boxes that need arguments of their own (such as {{User:UBX/Monty Python}}) cannot be used with Babel.

[edit] Using tables

A fourth alternative would be to table your userboxes. For example:

{| style="margin: 1em auto 1em auto"
| {{User:AusTerrapin/Box:Jazz Fusion}} {{User_USAFo5}}
|-
| {{user helper}} {{User:The Raven's Apprentice/Userboxes/User Warm}}
|}


would produce the following:

This user enjoys jazz-rock fusion.
This user helps out newcomers.
This user prefers warm weather.

[edit] Combining tables and the boxboxtop template

A fifth method of grouping boxes is done by combining Examples 2 and 4 together. Example 2 breaks DHTML interoperability. It works as intended on Internet Explorer; however, it does not work well with Firefox and Opera when additional hide/show sections are added. This solution provides proper rendering on all three web browsers and scales much better when it comes to the number of groups you want to have. The table property can be adjusted by adding width="100%" (adjusting its percentage or by using a pixel width multiple of the userbox) to add more than one column. Another property align="right" can be changed to place the userboxes left, right, or center of the page.

{|align="right" width="160px" style="background-color: transparent;"
|-
|<div>
{{boxboxtop| }}
<div class="NavFrame" style="padding: 0; border-style: none;">
<div class="NavFrame" style="border-style: none; padding: 0;">
<div class="NavHead" style="background: #edf1f1; text-align: left; text-style: normal;">
Caption</div><div class="NavContent" style="display: none;">
Place your userboxes here...
</div></div></div>
{{boxboxbottom}}
Place additional userbox groups here...
</div>
|}