Difference between revisions of "Template:UG"

From Wikispooks
Jump to navigation Jump to search
m
(add category)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
+
<noinclude>[[category:Convenience Templates]]
 
This makes a link to the [http://UnwelcomeGuests.net Unwelcome Guests] radio show.
 
This makes a link to the [http://UnwelcomeGuests.net Unwelcome Guests] radio show.
 +
 
The different sections of the template begin with a '|' character. i.e.
 
The different sections of the template begin with a '|' character. i.e.
 
<br/><font face="courier">|link=</font face="courier">The address of the link (name of the end of the URL (e.g. 517)
 
<br/><font face="courier">|link=</font face="courier">The address of the link (name of the end of the URL (e.g. 517)
 
<br/><font face="courier">|desc=</font face="courier">Description
 
<br/><font face="courier">|desc=</font face="courier">Description
 
<br/><font face="courier">|type=</font face="courier">{cat, episode, person} for link to a '''cat'''egory, a single '''episode''' (the default) or a '''person'''
 
<br/><font face="courier">|type=</font face="courier">{cat, episode, person} for link to a '''cat'''egory, a single '''episode''' (the default) or a '''person'''
 +
 +
==Category example==
 +
 +
<font face="courier"><nowiki> {{UG |link=War |type=cat |desc=war}} </nowiki></font> => {{UG |link=Category:War |type=cat |desc=war}}
  
 
==Episode example==
 
==Episode example==
Line 10: Line 15:
 
<font face="courier"><nowiki> {{UG |link=517 |type=episode |desc=the assassination of JFK}} </nowiki></font>=>{{UG |link=517 |type=episode |desc=the assassination of JFK}}  
 
<font face="courier"><nowiki> {{UG |link=517 |type=episode |desc=the assassination of JFK}} </nowiki></font>=>{{UG |link=517 |type=episode |desc=the assassination of JFK}}  
  
==Category example==
+
==Person example==
  
<font face="courier"><nowiki> {{UG |link=Category:War |type=cat |desc=war}} </nowiki></font> => {{UG |link=Category:War |type=cat |desc=war}}
+
<font face="courier"><nowiki> {{UG |link=Peter_Dale_Scott |type=person |desc=Peter Dale Scott}} </nowiki></font> => {{UG |link=Peter_Dale_Scott |type=person |desc=Peter Dale Scott}}
  
</noinclude>
+
</noinclude><includeonly>{{#if: {{{link|}}} | {{#if: {{{desc|}}} | {{#switch: {{{type|}}}
<includeonly>{{#if: {{{link|}}} |  
+
| cat    = * [http://UnwelcomeGuests.net/{{{link}}} Set of radio shows about {{{desc|}}}]
{{#if: {{{desc|}}} | x |  <font color="red">Missing 'desc' parameter</font> }} | <font color="red">Missing 'link' parameter</font> }}
+
| person  = * [http://UnwelcomeGuests.net/Special:WhatLinksHere/{{{link}}}%26limit%3D500 Set of radio shows featuring {{{desc|}}}]
 +
  | * [http://UnwelcomeGuests.net/{{{link}}} Radio show about {{{desc|}}}]
 +
}} | <font color="red">Missing 'desc' parameter</font> }} | <font color="red">Missing 'link' parameter</font> }}

Latest revision as of 01:50, 24 October 2012

This makes a link to the Unwelcome Guests radio show.

The different sections of the template begin with a '|' character. i.e.
|link=The address of the link (name of the end of the URL (e.g. 517)
|desc=Description
|type={cat, episode, person} for link to a category, a single episode (the default) or a person

Category example

{{UG |link=War |type=cat |desc=war}} =>

Episode example

{{UG |link=517 |type=episode |desc=the assassination of JFK}} =>

Person example

{{UG |link=Peter_Dale_Scott |type=person |desc=Peter Dale Scott}} =>