Difference between revisions of "Template:Portal component"

From blackwiki
Jump to navigation Jump to search
test>Jerem43
(→‎See also: Add more links to related templates)
test>Jerem43
({{esoteric}} {{documentation}} {{purgepage}})
Line 8: Line 8:
 
</includeonly>
 
</includeonly>
 
<noinclude>
 
<noinclude>
 
+
{{esoteric}}
To see a real time example, see [[Special:Whatlinkshere/{{FULLPAGENAME}}|what links here]].
+
{{documentation}}
 
+
{{purgepage}}
Here's a stale example of the output generated by this template.
 
{{Portal:Box-header | title=header
 
|editpage=Template:Lorem ipsum
 
|border=Black          <!-- This is the color of the borders around Box Sections -->
 
|titleforeground=#ffe247    <!-- This is the color of the Box Section Title Bar text -->
 
|titlebackground=#A9A9A9  <!-- This is the color of the Box Section Title Bar -->
 
|background=#FFFFFF      <!-- This is the color of the Box Section background -->
 
|foreground=black}}      <!-- This is the color of the Box Section text -->
 
{{Lorem ipsum}}
 
{{Portal:box-footer |Full page • Suggest • Archive}}
 
 
 
Using this template for your portal page is easy!
 
 
 
==Prerequisites==
 
* Create a subpage first. If your portal is '''Portal:Foo''', then a subpage could be '''Portal:Foo/Selected article'''.
 
* Next step vary according to mode:
 
#random number: Under that subpage, create subpage to that page, named 1, 2, 3, ... with no prefixing 0. And it does '''not''' start with 0.
 
#random list: Under that subpage, create subpage to that page, named regularly as their source topics in wikipedia for e.g : History , Vector , etc...
 
#deterministic:In thgis subpage , write your topic
 
==Modes==
 
The default mode is deterministic. Three modes are available. Mode is determined by template according to pararameters passed:
 
#random number: act exactly as : [[template:random portal component with nominate]]  but footer parameter is called archive footer . this mode basic features:
 
##topics randomly chosen
 
##nominate and archive selected topic link in footer
 
#random list :accepts a list in the call of template instead of numbers , but you must list the names of all topics, this mode basic features:
 
##topics randomly chosen
 
##nominate and archive selected topic link in footer
 
##a link to fullpage of topic : applied that you named the subsubpage e.g.History exactly as the fullpage article
 
#deterministic:the same topic is always displayed in theportal component.
 
==Parameters==
 
Using this template for your portal page is easy! Just include these parameters : subgrouped accorrding to usage in which mode:
 
*All:
 
** '''header''': The header text of the box.
 
*'''random number''' and '''random list''' modes:
 
** '''archive footer''': (optional) The footer text in the box; it link to an archive page that is located at '''Portal:yourportal/Subpage name''' e.g. /Selected picture. If no footer text is passed the default Text is Archive
 
** '''subpage''': The subpage of the transcluded page, e.g. Selected picture
 
** '''max''': The maximum number of sub-subpages. Must be a positive integer. Default max=1.
 
** '''seed''': (optional) The default seed is 17 and can be set to any other integer value (used to generate distinct values on the same page).  Prime numbers work best, such as 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, and 113.
 
*'''deterministic''' mode only:
 
**'''footer''': define what appears in footer
 
*'''random list'''mode only:
 
**:() any other unnamed parameters is consider as element of random list
 
 
 
== See also ==
 
* {{tl|Box portal skeleton}} - used to create portal main pages
 
* {{tl|Random portal component}} - used on the portal main page to randomly displaye articles on portal sub-pages
 
* {{tl|Numbered subpages}} - used to create article links on portal sub-pages
 
 
 
These templates are used to create the articles on the subpages:
 
* {{tl|Selected article}}
 
* {{tl|Selected biography}}
 
* {{tl|Selected business}}
 
* {{tl|Selected DYK}}
 
* {{tl|Selected ingredient}}
 
* {{tl|Selected quote}}
 
* {{tl|Selected picture}}* {{tl|Selected article}}
 
* {{tl|Selected biography}}
 
* {{tl|Selected business}}
 
* {{tl|Selected DYK}}
 
* {{tl|Selected ingredient}}
 
* {{tl|Selected picture}}
 
* {{tl|Selected quote}}
 
 
 
[[Category:Wikipedia Portal templates]]
 
 
</noinclude>
 
</noinclude>

Revision as of 23:16, 4 February 2009


50px Template documentation[view] [edit] [history] [purge]

Usage

Using this template for your portal page is easy!

To see a real time example, see what links here.

Here's a stale example of the output generated by this template.


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.

Full page • Suggest • Archive

Prerequisites

  • Create a subpage first. If your portal is Portal:Foo, then a subpage could be Portal:Foo/Selected article.
  • Next step vary according to mode:
  1. random number: Under that subpage, create subpage to that page, named 1, 2, 3, ... with no prefixing 0. And it does not start with 0.
  2. random list: Under that subpage, create subpage to that page, named regularly as their source topics in Wikipedia for e.g. : History, Vector, etc.
  3. deterministic:In this subpage, write your topic

Modes

The default mode is deterministic. Three modes are available. Mode is determined by template according to pararameters passed:

  1. random number: act exactly as : template:random portal component with nominate but footer parameter is called archive footer . this mode basic features:
    1. topics randomly chosen
    2. nominate and archive selected topic link in footer
  2. random list :accepts a list in the call of template instead of numbers, but you must list the names of all topics, this mode basic features:
    1. topics randomly chosen
    2. nominate and archive selected topic link in footer
    3. a link to fullpage of topic : applied that you named the subsubpage e.g.History exactly as the fullpage article
  3. deterministic:the same topic is always displayed in theportal component.

Parameters

Using this template for your portal page is easy! Just include these parameters : subgrouped according to usage in which mode:

  • All:
    • header: The header text of the box.
  • random number and random list modes:
    • archive footer: (optional) The footer text in the box; it link to an archive page that is located at Portal:yourportal/Subpage name e.g. /Selected picture. If no footer text is passed the default Text is Archive
    • subpage: The subpage of the transcluded page, e.g. Selected picture
    • max: The maximum number of sub-subpages. Must be a positive integer. Default max=1.
    • seed: (optional) The default seed is 17 and can be set to any other integer value (used to generate distinct values on the same page). Prime numbers work best, such as 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, and 113.
  • deterministic mode only:
    • footer: define what appears in footer
  • random listmode only:
    • () any other unnamed parameters is consider as element of random list

See also

Portal content templates

Main portal page formatting templates

Templates that configure links

Selected page templates, used on subpages of older portals

Related templates

Template:Purgepage