Difference between revisions of "Template:PortalPastSel"

From blackwiki
Jump to navigation Jump to search
test>Slambo
(initial checkin)
 
test>Slambo
m (fix syntax)
Line 1: Line 1:
<includeonly>Recently selected: {{#ifexist: Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=52 |#default={{#expr: {{{week}}} - 1}} }}, {{#switch: {{{week}}} |1={{#expr: {{{year}}} - 1 }} |#default={{{year}}} }}/link | {{Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=52 |#default={{#expr: {{{week}}} - 1}} }}, {{#switch: {{{week}}} |1={{#expr: {{{year}}} - 1 }} |#default={{{year}}} }}/link}}}} - {{#ifexist: Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=51 |2=52 |#default={{#expr: {{{week}}} - 2}} }}, {{#switch: {{{week}}} |1|2={{#expr: {{{year}}} - 1}} }} |#default={{{year}}} }}/link | {{Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=51 |2=52 |#default={{#expr: {{{week}}} - 2}} }}, {{#switch: {{{week}}} |1|2={{#expr: {{{year}}} - 1}} }} |#default={{{year}}} }}/link}}}} - {{#ifexist: Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=50 |2=51 |3=52 |#default={{#expr: {{{week}}} - 3}} }}, {{#switch: {{{week}}} |1|2|3={{#expr: {{{year}}} - 1}} |#default={{{year}}} }}/link | {{Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=50 |2=51 |3=52 |#default={{#expr: {{{week}}} - 3}} }}, {{#switch: {{{week}}} |1|2|3={{#expr: {{{year}}} - 1}} |#default={{{year}}} }}/link}}}}</includeonly><noinclude>
+
<includeonly>Recently selected: {{#ifexist: Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=52 |#default={{#expr: {{{week}}} - 1}} }}, {{#switch: {{{week}}} |1={{#expr: {{{year}}} - 1 }} |#default={{{year}}} }}/link | {{Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=52 |#default={{#expr: {{{week}}} - 1}} }}, {{#switch: {{{week}}} |1={{#expr: {{{year}}} - 1 }} |#default={{{year}}} }}/link}}}} - {{#ifexist: Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=51 |2=52 |#default={{#expr: {{{week}}} - 2}} }}, {{#switch: {{{week}}} |1|2={{#expr: {{{year}}} - 1}} |#default={{{year}}} }}/link | {{Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=51 |2=52 |#default={{#expr: {{{week}}} - 2}} }}, {{#switch: {{{week}}} |1|2={{#expr: {{{year}}} - 1}} |#default={{{year}}} }}/link}}}} - {{#ifexist: Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=50 |2=51 |3=52 |#default={{#expr: {{{week}}} - 3}} }}, {{#switch: {{{week}}} |1|2|3={{#expr: {{{year}}} - 1}} |#default={{{year}}} }}/link | {{Portal:{{{portalname}}}/Selected {{{type}}}/Week {{#switch: {{{week}}} |1=50 |2=51 |3=52 |#default={{#expr: {{{week}}} - 3}} }}, {{#switch: {{{week}}} |1|2|3={{#expr: {{{year}}} - 1}} |#default={{{year}}} }}/link}}}}</includeonly><noinclude>
 
{{esoteric}}
 
{{esoteric}}
 
== Description ==
 
== Description ==

Revision as of 14:36, 28 December 2006

Description

This template is designed to create the "Recently selected" links at the bottom of the Selected article and Selected picture abstracts on portals.

Usage

{{PortalPastSel|portalname=|type=|week=|year=}}

The three parameters are:

  • portalname - The name of the portal
  • type - Either "article" or "picture"
  • weeknum - The week number
  • year - The year

This template expects that links to the previous selections are stored in pages named like [[Portal:portalname/Selected type/Week week, year/link]]. The entire contents of the /link pages should be the exact link that will appear in the Recently selected list.

For example...

{{PortalPastSel|portalname=Trains|type=article|week=52|year=2006}}

produces:

Recently selected:  -  -