Template:Portal bar/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Emmette Hernandez Coleman
Importing "Location" and "Image" sections form Template:Portal/doc
Ookami (talk | contribs)
m 58 revisions imported
 
(35 intermediate revisions by 19 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{High-use|76388}}
This template is well suited for articles that have more portals than related articles in the "See also" section, which would make a regular {{tl|portal}} sprawl into the next section.
{{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.}}


It does not have widespread support so its usage should be considered carefully. For instance, it should not be used if there is only one portal that needs displaying.
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.


=== Usage ===
{{Lua|Module:Portal bar}}
This template will take up to eighteen portal links. To add the template to a page, simply use the following code:


<pre>
== Usage ==
<nowiki>{{Portal bar|portal 1|portal 2|...|portal 18}}</nowiki>
{{xref|See {{section link|Module:Portal|Image}} on how to add, update, or remove portal images.}}
</pre>


==Location==
=== Border ===
Within articles, this template is meant to be placed at the bottom of the article in the ''See also'' section.
To add the template to a page:
: &rarr; <code><nowiki>{{Portal bar|Biology|Fungi|Plants|Science}}</nowiki></code>
{{Portal bar|Biology|Fungi|Plants|Science}}
 
=== No border ===
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}}
 
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.  


==Image==
== Error tracking ==
The portal image defaults to one that is specified in Template:Portal/Images/PortalName for the portal, or a generic image. There is a [[Template:Portal/Images|list of all such images]]. Have in mind that the "PortalName" variable should only have an upper case letter at the first word, the second and later words should be written in lower case, regardless of how is the name of the portal actually written. For example, [[Portal:Buenos Aires]] is written with two capital letters, but the subpage to host the image is [[Template:Portal/Images/Buenos aires]], with only one capital letter.
If the {{{type|template}}} is used incorrectly, the page will be added to a tracking category.


===Example===
The tracking categories are not applied if any of the following is true:
<pre>
# 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>
<nowiki>{{Portal bar|Biology|Fungi|Plants|Science}}</nowiki>
# 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
</pre>
# The title page on which the template is used includes any of the following case-insensitive strings: "/archive", "/doc", "/test"


This yields:
* [[:Category:Portal templates without a parameter]] — (population {{PAGESINCATEGORY:Portal templates without a parameter}})
* [[:Category:Portal templates with redlinked portals]] — (population {{PAGESINCATEGORY:Portal templates with redlinked portals}})
* [[:Category:Portal templates with all redlinked portals]] — (population {{PAGESINCATEGORY:Portal templates with all redlinked portals}})
:{{Purge page|''Purge page to update totals''}}


{{Portal bar|Biology|Fungi|Plants|Science}}
== TemplateData ==
{{clear}}
{{Collapse top|[[WP:TemplateData|TemplateData]] documentation used by [[WP:VisualEditor|VisualEditor]] and other tools}}
{{TemplateData header|noheader=1}}
<templatedata>
{
"params": {
"1": {
"required": true,
"type": "string/line",
"description": "The first portal, without surrounding text. For example, use \"Science\" to display the science portal."
},
"2": {
"type": "string/line",
"description": "The second portal."
},
"3": {
"type": "string/line",
"description": "The third portal."
},
"4": {
"type": "string/line",
"description": "The fourth portal"
},
"5": {
"type": "string/line",
"description": "The fifth portal."
},
"border": {
"type": "string/line",
"description": "Set this to \"no\" if you do not want to display a border around the portals. You can also use \"n\", \"false\", or \"0\"."
}
},
"description": "This template adds a bar of portals. It is usually used just above an article's navboxes or in its \"See also\" section when using [[Template:Portal]] would cause formatting problems."
}
</templatedata>
{{Collapse bottom}}


===See also===
== See also ==
*[[Template:Portal]]
* {{tl|Portal}}
*[[Template:Portal-inline]]
* {{tl|Subject bar}}


<includeonly>
<includeonly>{{Sandbox other||
<!-- Categories -->
[[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>
 
<!--Interwikis-->
[[ms:Templat:Portal bar]]
[[fr:Modèle:Portail]]
</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