Template:Portal bar/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Zyxw
m →‎TemplateData: update TemplateData header
Ookami (talk | contribs)
m 58 revisions imported
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])-->
{{High-use|76388}}
{{Warning|'''This template is only transcluded (visible) in mobile view when the <code><nowiki>border=n</nowiki></code> parameter  is implemented'''. See [[Wikipedia:Portal#How to add portal links to articles|how to add portal links to articles]] for more information.}}
{{Warning|{{strong|This template does not belong in the "See also" section.}} Per [[MOS:SECTIONORDER]], this template is bottom matter and goes below standard navigation templates, and above geographical coordinates and authority control templates.}}
 
The primary purpose of this template is for when using {{tlx|portal}} would cause formatting problems. This template forms a horizontal bar instead of a vertical, sidebar-like template. Please note that this template {{strong|[[MOS:ORDER|does not belong]]}} in the "See also" section.
 
{{Lua|Module:Portal bar}}
{{Lua|Module:Portal bar}}
{{High-use|73550}}
The primary purpose of this template is for when using {{tl|Portal}} would cause formatting problems. Sometimes images and infoboxes can push the regular, vertical <nowiki>{{portal}}</nowiki> template outside of the "See also" section. This template forms a horizontal bar, instead of a vertical, sidebar-like template.
This template is well suited for articles that have more portals than related articles in the "See also" section, which would cause a regular <nowiki>{{portal}}</nowiki> sprawl into the next section, although a regular <nowiki>{{portal}}</nowiki> with {{tl|clear}} would sometimes work better, depending on how much white space <nowiki>{{portal}} with {{clear}}</nowiki> would cause.


== Usage ==
== Usage ==
To add the template to a page, use the following code:
{{xref|See {{section link|Module:Portal|Image}} on how to add, update, or remove portal images.}}
 
<pre>
{{Portal bar|portal 1|portal 2|...}}
</pre>
 
For a version with no border, use border=no:
 
<pre>
{{Portal bar|portal 1|portal 2|...|border=no}}
</pre>
 
==Location==
Within articles, this template is usually placed at the bottom of the article, below navbars. For further information, see [[MOS:ORDER]].
 
==Image==
The portal image name is found using [[Module:Portal]]. Please see {{section link|Module:Portal|Image}} for instructions on how to add, update, or remove an image.


==Examples==
=== Border ===
<pre>
To add the template to a page:
: &rarr; <code><nowiki>{{Portal bar|Biology|Fungi|Plants|Science}}</nowiki></code>
{{Portal bar|Biology|Fungi|Plants|Science}}
{{Portal bar|Biology|Fungi|Plants|Science}}
</pre>
Produces:


{{Portal bar|Biology|Fungi|Plants|Science}}
=== No border ===
{{clear}}
For a version with no border that can be seen in [[WP:MOBILE|mobile view]]:
: &rarr; <code><nowiki>{{Portal bar|Biology|Fungi|Plants|Science|border=n}}</nowiki></code>
{{Portal bar|Biology|Fungi|Plants|Science|border=n}}


<pre>
Portal bar with border extends to the full width of the article, and that can be a problem with right-floating items. To use space better, remove the border.
{{Portal bar|Biology|Fungi|Plants|Science|border=no}}
</pre>


Produces:
== Error tracking ==
If the {{{type|template}}} is used incorrectly, the page will be added to a tracking category.


{{Portal bar|Biology|Fungi|Plants|Science|border=no}}
The tracking categories are not applied if any of the following is true:
{{clear}}
# Tracking is specially disabled for that usage. This is done by setting the optional parameter {{para|tracking}} to any the following values: <code><nowiki>no</nowiki></code>, <code><nowiki>n</nowiki></code>, <code><nowiki>false</nowiki></code>
# the template is used on a page in any of these namespaces: Talk, User, User talk, Wikipedia talk, File talk, Template talk, Category talk, Portal talk, Draft, Draft talk, Module talk
# The title page on which the template is used includes any of the following case-insensitive strings: "/archive", "/doc", "/test"


==See also==
* [[:Category:Portal templates without a parameter]] — (population {{PAGESINCATEGORY:Portal templates without a parameter}})
* [[Template:Subject bar]]
* [[:Category:Portal templates with redlinked portals]] — (population {{PAGESINCATEGORY:Portal templates with redlinked portals}})
{{Portal template list}}
* [[:Category:Portal templates with all redlinked portals]] — (population {{PAGESINCATEGORY:Portal templates with all redlinked portals}})
:{{Purge page|''Purge page to update totals''}}


== TemplateData ==
== TemplateData ==
{{Collapse top|[[Wikipedia:TemplateData|TemplateData]] documentation used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools}}
{{Collapse top|[[WP:TemplateData|TemplateData]] documentation used by [[WP:VisualEditor|VisualEditor]] and other tools}}
{{TemplateData header|noheader=1}}
{{TemplateData header|noheader=1}}
<templatedata>
<templatedata>
Line 86: Line 73:
{{Collapse bottom}}
{{Collapse bottom}}


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
== See also ==
<!--Categories below this line, please; interwikis at Wikidata-->
* {{tl|Portal}}
* {{tl|Subject bar}}
 
<includeonly>{{Sandbox other||
[[Category:Exclude in print]]
[[Category:Internal link templates]]
[[Category:Internal link templates]]
[[Category:Wikipedia Portal navflags]]
[[Category:Wikipedia Portal navflags]]
[[Category:Exclude in print]]
}}</includeonly>
}}</includeonly>

Latest revision as of 13:35, 3 September 2020

The primary purpose of this template is for when using {{portal}} would cause formatting problems. This template forms a horizontal bar instead of a vertical, sidebar-like template. Please note that this template does not belong in the "See also" section.

Usage