Bản mẫu:Related portals
Mục đích
[sửa mã nguồn]This template simplifies the creation and maintenance of the "Related portals" box within portal pages. It creates a list of 1 to 30 clickable links to related portals.
Also consider the template {{Related portals2}}, which is easier to use and works better on narrow screens.
Cách sử dụng
[sửa mã nguồn]- portalcount—Required; the number of portal links in the list. The template supports up to 30.
- size—Optional; the size of each portal image. This defaults to 60×60px which seems about right.
- per row—Optional; the maximum number of portal links before wrapping to a new row. On small screens, links will wrap sooner, if needed. If omitted, links will only wrap when needed.
- These must be followed by pairs of unnamed parameters:
- An image name, with no "File:" or "Image:" prefix. Optional; if blank then a default image will be used.
- The name of the portal to be linked to, with no "Portal:" prefix.
If the portal name is too long to display neatly, then consider creating a redirect from a shorter name to the portal page, and using that shorter name in the list passed to this template.
Ví dụ
[sửa mã nguồn]{{Related portals|portalcount=4|per row=4 | Apple Campus One Infinite Loop Sign.jpg | Apple Inc. | Circle of spam.svg | Bảo mật máy tính | <!-- Let's pretend this was deleted --> | Khoa học máy tính | Desktop computer clipart - Yellow theme.svg | Công nghệ thông tin }}
Hình ảnh mặc định
[sửa mã nguồn]The default portal image name is found using Mô đun:Portal. Please see Mô đun:Portal#Image for instructions on how to add, update, or remove a default image.
Xem thêm
[sửa mã nguồn]Bản mẫu nội dung cổng thông tin
- To display "selected content" on the portal main page
- {{Transclude list item excerpts as random slideshow}}—transcludes excerpts from recognized content lists, which are populated by a bot.
- {{Transclude random subpage}}—transcludes random portal subpage.
- {{Random portal component}}—transcludes random portal subpage.
- {{Random subpage}}—transcludes random portal subpages.
- {{Portal pictures}}—transcludes a slideshow of pictures, utilizing a single-page gallery.
- To organize "selected content" on subpages
- {{Numbered subpages}}—outputs an automatic index, transcluding numbered subpages.
- {{Portal subpage}}—outputs a box linking to and transcluding a single subpage.
- {{Portal subpage inline}}—outputs an unordered list item linking to and transcluding a single subpage.
Main portal page formatting templates
- {{Box-header}}
- {{Box-header-plain}}
- {{Box-header-round}}
- {{Box-header-square}}
- {{Box-header-watch}}
- {{Box-footer}}
Templates that configure links
- {{Portal}}
- {{Portal bar}}
- {{Portal-inline}}
- {{Pbox}}
- {{Portals}}
- {{Portals browsebar}}
- {{Related portals}}
- {{Wikimedia for portals}}
Selected page templates, used on subpages of older portals
- {{Selected article}}
- {{Selected biography}}
- {{Selected business}}
- {{Selected DYK}}
- {{Selected ingredient}}
- {{Selected location}}
- {{Selected picture}}
- {{Selected product}}
- {{Selected publication}}
- {{Selected quote}}
- {{Selected recipe}}
- {{Selected X}}
Related templates