![]() | This is a documentation subpage for Template:Branded Button. It may contain usage information, categories and other content that is not part of the original template page. |
This template creates a clickable button with an image in the background to make it look a branded button. It is not for use in articles, but in project pages, portals, template documentation, and userspace. It offers various parameters to customize display.
To use the template, place ((Branded button))
anywhere on the page you want the button to appear, and customize the input with the optional parameters, listed below.
Just ((Branded button))
by itself will just produce the sample test button shown above, which links to the Wikipedia main page, as a demo.
Typical basic use: ((Branded button|link=Wikipedia page name here|name=Button text here))
|text=
– a.k.a. |name=
, |title=
, |content=
, to match similar parameters in other templates; |1=
, first unnamed parameter|link=
– a.k.a. |page=
, |url=
, |2=
, second unnamed parameter[[...]]
– around the page name.:
), or wiktionary:omphaloskepsis#Etymology.|class=
progressive
and destructive
.|file=
– a.k.a. |File=
, |image=
, |icon=
, |3=
, third unnamed parameter|scale=
– a.k.a. |upright=
|frameless|upright=value here
feature of the MediaWiki image syntax as described at WP:Picture tutorial. You simply supply the numeric value; no units like px are added. The default is 0.135, and works well for square or nearly-square images. If you select an unusually wide or tall image, you will likely need to change this to get to not be tiny or to not be too tall for the button, respectively. See the cat button example below.|opacity=
|offset=
, below.|offset=
|text=
parameter to the right by the specified amount, to prevent overlapping of text and image, especially when not using the |opacity=
default of a rather translucent image. Specify this is em units, e.g. 2.5em (note the lack of space between the measure and the unit name). See the cat button example below. If you use px units, it will look wrong on the screen of anyone with different settings from yours. If you use % units, it will change undesirably with window width.|float=
|center=yes
<center>...</center>
markup, which needs to be replaced. Presumably has some kind of centering effect, though whether this affects the text in the box or the button on the page is unclear.The default:
((Branded button))
will produce the following:
This:
((Branded button|link=Main Page|name=Main Page))
will produce the following, flush left with its container (in this case, the entire content area aside from the left sidebar):
This (notice the link change):
((Branded button|link=Portal:Contents|name=Wikipedia Contents|file=File:Wikipedia.png))
will produce:
Class parameter:
((Branded button|link=Portal:Contents|name=Wikipedia Contents|file=File:Wikipedia.png|class=progressive))
will produce:
Float left:
((Branded button|link=Main Page|name=Main Page|float=left))
will produce the following:
You may need to use ((clear|left))
after this if it interferes with other content.
Float right:
((Branded button|link=Main Page|name=Main Page|float=right))
will produce the button to the far right:
You may need to use ((clear|right))
after this if it interferes with other content.
Center:
((Branded button|link=Main Page|name=Main Page|center=yes))
will produce the button to the far right:
Complex example of a cat breed button that could be used at WP:WikiProject Cats:
((Branded button|file=File:Brown spotted tabby bengal cat.jpg|scale=0.3|opacity=1|name=Bengal (hybrid)|offset=4em|link=Bengal cat))
produces:
Button templates | |
---|---|
General button templates |
|
WikiProject-specific buttons |
|