Difference between revisions of "Template:Portal archive"

From blackwiki
Jump to navigation Jump to search
test>Tuxa
m (→‎format: doc coorcting example)
test>Tuxa
(mode is determined from passed parameters)
Line 1: Line 1:
<includeonly>#switch: {{{mode}}}|number={{for loop|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|call=subpage|sep=}}  
+
<includeonly>{{#if: {{{1|}}}|{{for loop|{{{1}}}|{{{2}}}|{{{3}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8}}}|{{{9}}}|{{{10}}}|{{{11}}}|{{{12}}}|{{{13}}}|{{{14}}}|{{{15}}}|{{{16}}}|{{{17}}}|{{{18}}}|{{{19}}}|{{{20}}}|{{{21}}}|{{{22}}}|{{{23}}}|{{{24}}}|{{{25}}}|{{{26}}}|{{{27}}}|{{{28}}}|{{{29}}}|{{{30}}}|{{{31}}}|{{{32}}}|{{{33}}}|{{{34}}}|{{{35}}}|{{{36}}}|{{{37}}}|{{{38}}}|{{{39}}}|{{{40}}}|{{{41}}}|{{{42}}}|{{{43}}}|{{{44}}}|{{{45}}}|{{{46}}}|{{{47}}}|{{{48}}}|{{{49}}}|{{{50}}}|call=subpage|sep=}} | {{for loop|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|call=subpage|sep=}}
|list={{for loop|{{{1}}}|{{{2}}}|{{{3}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8}}}|{{{9}}}|{{{10}}}|{{{11}}}|{{{12}}}|{{{13}}}|{{{14}}}|{{{15}}}|{{{16}}}|{{{17}}}|{{{18}}}|{{{19}}}|{{{20}}}|{{{21}}}|{{{22}}}|{{{23}}}|{{{24}}}|{{{25}}}|{{{26}}}|{{{27}}}|{{{28}}}|{{{29}}}|{{{30}}}|{{{31}}}|{{{32}}}|{{{33}}}|{{{34}}}|{{{35}}}|{{{36}}}|{{{37}}}|{{{38}}}|{{{39}}}|{{{40}}}|{{{41}}}|{{{42}}}|{{{43}}}|{{{44}}}|{{{45}}}|{{{46}}}|{{{47}}}|{{{48}}}|{{{49}}}|{{{50}}}|call=subpage|sep=}} }}</includeonly>
+
| }}</includeonly>
  
 
<noinclude>
 
<noinclude>
Line 6: Line 6:
 
Template to show  subpages  .Maximum number of subpages  must be defined in Template by repeating parameters used in forLoop template till maximum .Maximum is defined here as 50  .  
 
Template to show  subpages  .Maximum number of subpages  must be defined in Template by repeating parameters used in forLoop template till maximum .Maximum is defined here as 50  .  
 
==Modes==
 
==Modes==
#numeber :arranged ascendingly from 1 to maximum, passing parameter as maximum is not supported yet
+
Mode is determined by template according to pararameters passed:
 +
#number :arranged ascendingly from 1 to maximum, passing parameter as maximum is not supported yet
 
#list : in call of template list all subpages seperated as parameters . i.e. seperated with :<nowiki>|</nowiki>
 
#list : in call of template list all subpages seperated as parameters . i.e. seperated with :<nowiki>|</nowiki>
  
Line 13: Line 14:
 
==format==
 
==format==
 
example
 
example
<nowiki>{{Portal archive |mode=number}} or {{Portal archive|mode=list|telecommuniction|wimax|zig-bee|Amplitude mdulation</nowiki>
+
<nowiki>numerical mode: {{Portal archive }} or list mode: {{Portal archive|telecommuniction|wimax|zig-bee|Amplitude mdulation}}</nowiki>
 
 
 
==trivial==
 
==trivial==
 
passing parameter as maximum in number mode  is not supported yet .In fact its only way is by using #for (MediaWiki 1.7+);In fact this template would be much easier if used #for but it is a part of MediaWiki 1.7 (not used yet).
 
passing parameter as maximum in number mode  is not supported yet .In fact its only way is by using #for (MediaWiki 1.7+);In fact this template would be much easier if used #for but it is a part of MediaWiki 1.7 (not used yet).

Revision as of 09:20, 25 August 2007


Usage

Template to show subpages .Maximum number of subpages must be defined in Template by repeating parameters used in forLoop template till maximum .Maximum is defined here as 50 .

Modes

Mode is determined by template according to pararameters passed:

  1. number :arranged ascendingly from 1 to maximum, passing parameter as maximum is not supported yet
  2. list : in call of template list all subpages seperated as parameters . i.e. seperated with :|

Practical Usage example

selected articles page in a portal that it is needed to show all selected aricles stored in subpages in it.

format

example numerical mode: {{Portal archive }} or list mode: {{Portal archive|telecommuniction|wimax|zig-bee|Amplitude mdulation}}

trivial

passing parameter as maximum in number mode is not supported yet .In fact its only way is by using #for (MediaWiki 1.7+);In fact this template would be much easier if used #for but it is a part of MediaWiki 1.7 (not used yet).

Used Templates