ਮੌਡਿਊਲ:Transclude random subpage/doc
This is the documentation page for ਮੌਡਿਊਲ:Transclude random subpage
ਇਹ ਮੌਡਿਊਲ ਹੇਠ ਲਿਖੇ ਮੌਡਿਊਲਾਂ ਉੱਤੇ ਨਿਰਭਰ ਕਰਦਾ ਹੈ: |
This template pulls in the content from one subpage from a set of subpages. Designed primarily for use on portals.
Layout
ਸੋਧੋ{{Transclude random subpage |max = |subpage = |rootpage = }}
Usage
ਸੋਧੋ- 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.
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 templatePortal:Foo/Selected bar
{{numbered subpages}}
on the page and save it. - 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>
Why this template?
ਸੋਧੋThis template was created to enable {{Random portal component}}
to be replaced with standard portal box notation, including {{Box-header colour}}
and {{Box-footer}}
.
Example:
{{Random portal component|max=22|header=Selected article}}
could be replaced by this:
{{Box-header colour|Selected article}} {{Transclude random subpage |max=22|subpage=Selected article}} {{Box-footer}}
This also allows a box to be modified (edited) independently of its contents, and to match the other boxes on the page.