ਫਰਮਾ:Random portal component
ਦਿੱਖ
ਇਹ ਫਰਮਾ ਹੇਠ ਲਿਖੇ ਲੂਆ ਨੂੰ ਵਰਤਦਾ ਹੈ: |
This template generates a box for a portal home page. The content is drawn randomly from a pre-defined list.
Layout
{{Random portal component |max = |template = |header = |footer = |subpage = |rootpage = |headertemplate = }}
Usage
- header: (Optional) The header text of the box. If no header is passed to the template, the default is the subpage name.
- footer: (Optional) The footer text in the box. E.g. Nominations for selected picture.
- rootpage: (Optional) The root of the transcluded page, e.g. Portal:Foo.
- subpage: The subpage of the transcluded page, e.g. Selected picture.
- max: The maximum number of sub-subpages. Must be a positive integer.
- headertemplate: (Optional) The name of the template to use for the box header, e.g.
for Template:Box-header/10; default is the portal'sBox-header/10
subpage/box-header
Formatting subpages
- Create a sub-page first. If your portal is
, then a sub-page could bePortal:Foo
.Portal:Foo/Selected bar
- On the
sub-page, place the template {{numbered subpages}} on the page and save it.Portal:Foo/Selected bar
- Once the list of subject links have been created, use one of the
templates from below to format each of the subject sub-pages.Selected <subject>
- This template calls
(if/box-header
is not specified) and {{box-footer}} for its color styles and closing. Eitherheadertemplate
must be used, or theheadertemplate
subpage must exist for everything to work correctly./box-header
Example
To see a real time example, see what links here (the list of pages that currently transclude the {{Random portal component}} template).
Here is a stale example of the output generated by this template.
{{Box-header | title=Header |editpage = Template:Lorem ipsum |border = Black |titleforeground = #ffe247 |titlebackground = #A9A9A9 |background = #FFFFFF |foreground = black }} {{Lorem ipsum}} {{Box-footer | Footer }}
will produce:
Header
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
See also
- Main portal creation templates
- {{Box portal skeleton}}—Used to create portal main pages.
- {{Random portal component}}—Used on the portal main page to randomly display articles from the portal sub-pages.
- {{Random portal component with nominate}}—Used on the portal main page to randomly display articles from the portal sub-pages, adding the option to nominate other Featured foo articles.
- {{Random subpage}}—Used on the portal main page to randomly display articles from the portal sub-pages. This template is best used for creating randomly populated Did you know... sections on the portal main page that are intended to include multiple Did you know... facts.
- {{Subpage}}—Used to output a box containing a link to subpage.
- {{Numbered subpages}}—Used to create article links on portal sub-pages with 50 links.
- {{25 numbered subpages}}—As hereinbefore, but with 25 links.
- {{75 numbered subpages}}—As hereinbefore, but with 75 links.
- {{100 numbered subpages}}—As hereinbefore, but with 100 links.
- {{Random box-header subpage}}—Used to transclude a numbered subpage.
- Main portal page formatting templates
3
- Templates that configure links
3
- These templates are used to format the articles on the sub-pages
{{Selected X}}—Generic template for situations not listed hereafter.
3
- Related templates