Module:Portal/doc
This is the documentation page for Module:Portal
This template is used on 7263827 pages, and changes to it will be widely noticed. Please test any changes in the template's /sandbox or /testcases subpages, or in a user subpage, and consider discussing changes at the talk page before implementing them. |
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
এই মডিউলে তলৰ মডিউলসমূহৰ ওপৰত নিৰ্ভৰ কৰে: |
This module uses TemplateStyles: |
This module has two functions, portal
and image
. The portal
produces a box with links to a portal or to multiple portals, and is used by the {{portal}} template. It is most often used in the "See also" section of an article. The image
function produces the name of the image used by the specified portal.
Portal function
সম্পাদনা কৰকThe portal function produces a box of portal links.
এয়া হৈছে ‘Module:Portal’ শীৰ্ষক সাঁচটোৰ নথিকৰণৰ উপপৃষ্ঠা। ইয়াত সাঁচটো ব্যৱহাৰৰ তথ্য, শ্ৰেণীসমূহ, আন্তঃৱিকি সংযোগবোৰ আৰু অন্য সমল থাকে, যিবোৰ মূল module পৃষ্ঠাটোৰ অংশ নহয়। |
This template is used on 3,500,000 pages. To avoid large-scale disruption and unnecessary server load, any changes should first be tested in this template's /sandbox or/testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please consider discussing any changes on the talk page before implementing them. |
This template is used to produce a link in a box to a portal or portals.
Parameters
সম্পাদনা কৰক{{Portal|Name 1|Name 2|Name 3...|size=Size|boxsize=Boxsize|margin=Margin}}
Name
- The name of the portal. If multiple portal names are used the other parameters will be ignored.
The following additional parameters are available. They are all optional, the default values are chosen to give a good look and feel across the encylopedia and should not be overridden without good reason.
|size=Size
- The width of the icon, as an integer. This is in units of pixels. The default is 28 times the image aspect ratio, which produces an image 28 pixels high.
|boxsize=Boxsize
- The width of the box, as an integer. This is in units of pixels. The default is to use a box wide enough to hold the text, if possible.
|margin=Margin
- The margin around the box. By default, the box is surrounded by a margin of width 0.5em, but this can be customized using
|margin=top right bottom left
(e.g.,|margin=0.25em 0 0.25em 0.25em
) or removed using|margin=0
(zero).
|break=Break
- If set to "Yes", adds a line break before the word "portal".
Images
সম্পাদনা কৰকThe portal image defaults to one that is specified in Template:Portal/Images/PortalName for the portal, or a generic image. There is a 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.
Location
সম্পাদনা কৰকWithin articles, this template is meant to be placed at the bottom of the article in the See also section.
Examples
সম্পাদনা কৰকCode |
Result |
---|---|
{{Portal|অসম}} |
|
{{Portal|অসম|size=15}} |
|
{{Portal|অসম|boxsize=50}} |
See also
সম্পাদনা কৰকImage function
সম্পাদনা কৰকThe image function produces the name of the image used by the specified portal.
Usage
সম্পাদনা কৰক{{#invoke:Portal|image|portal}}
Example
সম্পাদনা কৰক{{#invoke:Portal|image|Art}}
→ Ballerina-icon.jpg
Image dupes function
সম্পাদনা কৰকThe image dupes function returns a list of all images that are being used by more than one portal (aliases are not included). This can be helpful in identifying image entries that should be changed to use aliases.
Usage
সম্পাদনা কৰক{{#invoke:Portal|imageDupes}}
Display all function
সম্পাদনা কৰকThe display all function returns a box containing all portals that have images. This is used for maintenance, and should not be displayed in articles, because a) there are around 1500 portals with images, and displaying 1500 images on one page takes up a lot of server resources, and b) the module has no way to know the correct capitalisation of a portal name, so some links to portals will be broken. This function can be seen at Template:Portal/doc/all.
Usage
সম্পাদনা কৰক{{#invoke:Portal|displayAll}}