Template:Job table: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
No edit summary
No edit summary
Line 1: Line 1:
<div class=smwtable-exterior>{{#ask:[[Category:{{{cat|Television stories}}}]] [[{{{job1|{{PAGENAME}} }}}::+]] {{#if:{{{job2|}}}|OR [[{{{job2|}}}::+]]| }}
<div class=smwtable-exterior>{{#ask:[[Category:{{{cat|Television stories}}}]] [[{{{job1|{{PAGENAME}} }}}::+]] {{#if:{{{job2|}}}|OR [[{{{job2|}}}::+]]| }}
|?{{{job1|{{PAGENAME}} }}}
{{!}}?{{{job1|{{PAGENAME}} }}}
{{#if:{{{job2|}}}|{{?}}{{{job2}}}}}
{{#if:{{{job2|}}}|{{?}}{{{job2}}}}}
|limit=500
|limit=500

Revision as of 22:08, 13 May 2012

<ul><li>The part "|" of the query was not understood.Results might not be as expected.</li> <!--br--><li>The part "?Job table" of the query was not understood.Results might not be as expected.</li></ul>
Instructions for {{Job table}}
{{Job table}} is one of four templates used to create tables which list the episodes that have had a particular credit. The other templates in this series — all of which are required for the final product — are:
  • {{job table head}}, the template that creates the table headers
  • {{job table foot}}, the template that closes the template
  • {{job table core}}, the template that formats the data in the main body of the template
  • {{job table}}, the template that actually gets put on pages

Usage

Default variables

By default, this template assumes that it is working on all pages within the broad category, category:television stories. It also assumes that you are attempting to tabulate information about the property that has the same name as the page name.

These assumptions can both be changed.

Simplest case

In most instances, you would just place {{job table}} on a page and be done with it. As long as the page name matches the name of the property name, you don't really need to do much else.

If I typed {{job table}} on the page 3D artist, it will automatically generate a table which was formatted like the rest of our infoboxes and tables. On the list would be all the 3D artists who had been credited on any episode of any television show that this wiki covers.

You can see this most dramatically by choosing a more ubiquitous title like writer.

Story
24 Carat (webcast)
42 (TV story)
73 Yards (TV story)
The Abominable Snowmen (TV story)
Adam (TV story)
Adrift (TV story)
An Adventure in Space and Time (TV story)
Aeolian (TV story)
The Age of Steel (TV story)
Alien Avatar (TV story)
Aliens of London (TV story)
The Almost People (TV story)
The Ambassadors of Death (TV story)
Amy's Choice (TV story)
Analysis Lessons (webcast)
The Android Invasion (TV story)
The Androids of Tara (TV story)
Angel of the North (TV story)
The Angels Take Manhattan (TV story)
Arachnids in the UK (TV story)
Arc of Infinity (TV story)
The Ark (TV story)
The Ark in Space (TV story)
The Armageddon Factor (TV story)
Army of Ghosts (TV story)
Ascension of the Cybermen (TV story)
Asylum of the Daleks (TV story)
Attack of the Cybermen (TV story)
The Awakening (TV story)
The Aztecs (TV story)
Bad Night (home video)
Bad Wolf (TV story)
The Battle of Demons Run: Two Days Later (webcast)
The Battle of Ranskoor Av Kolos (TV story)
Battlefield (TV story)
The Beast Below (TV story)
Before the Flood (TV story)
The Bells of Saint John (TV story)
The Bells of Saint John: A Prequel (webcast)
The Big Bang (TV story)
Black Hunger (TV story)
Black Orchid (TV story)
Blink (TV story)
The Blood Line (TV story)
Boom (TV story)
Boom Town (TV story)
Born Again (TV story)
The Bounty Hunter (TV story)
Brain Trafficking (webcast)
Brave-ish Heart (TV story)
The Cambridge Spy (TV story)
Can You Hear Me? (TV story)
Captain Jack Harkness (TV story)
The Caretaker (TV story)
Carnival of Monsters (TV story)
Castrovalva (TV story)
The Categories of Life (TV story)
The Caves of Androzani (TV story)
The Celestial Toymaker (TV story)
The Chase (TV story)
Children in Need 2003 (TV story)
Children of Earth: Day Five (TV story)
Children of Earth: Day Four (TV story)
Children of Earth: Day One (TV story)
Children of Earth: Day Three (TV story)
Children of Earth: Day Two (TV story)
A Christmas Carol (TV story)
The Christmas Invasion (TV story)
The Church on Ruby Road (TV story)
Chute! Episode 9 (TV story)
Cinema Introduction to The Day of the Doctor (theatrical film)
City of Death (TV story)
Clara and the TARDIS (home video)
Clarence and the Whispermen (home video)
The Claws of Axos (TV story)
Closing Time (TV story)
Clown Court special (TV story)
Co-Owner of a Lonely Heart (TV story)
The Coach with the Dragon Tattoo (TV story)
Cold Blood (TV story)
Cold War (TV story)
Colony in Space (TV story)
Combat (TV story)
Comic Relief 2007 (TV story)
Countrycide (TV story)
The Creature from the Pit (TV story)
The Crimson Horror (TV story)
The Crusade (TV story)
The Crusade (home video)
Curse of Anubis (TV story)
The Curse of Clyde Langer (TV story)
The Curse of Fatal Death (TV story)
The Curse of Fenric (TV story)
The Curse of Fenric (TotT TV story)
The Curse of Peladon (TV story)
The Curse of the Black Spot (TV story)
The Custodians (TV story)
Cyberwoman (TV story)
Dalek (TV story)
The Dalek Invasion of Earth (TV story)
The Daleks (TV story)
The Daleks in Colour (TV story)
Daleks in Manhattan (TV story)
The Daleks' Master Plan (TV story)
Dark Water (TV story)
Day One (TV story)
A Day in the Death (TV story)
The Day of the Clown (TV story)
Day of the Daleks (TV story)
The Day of the Doctor (TV story)
Day of the Moon (TV story)
Dead Man Walking (TV story)
Dead of Night (TV story)
The Deadly Assassin (TV story)
Death Is the Only Answer (TV story)
Death in Heaven (TV story)
Death of the Doctor (TV story)
Death to the Daleks (TV story)
Deep Breath (TV story)
Defenders of Earth (webcast)
Delta and the Bannermen (TV story)
Demons of the Punjab (TV story)
Dermot and the Doctor (TV story)
Destination: Skaro (TV story)
Destiny of the Daleks (TV story)
Detained (TV story)
The Devil's Chord (TV story)
Dimensions in Time (TV story)
Dinosaurs on a Spaceship (TV story)
The Doctor Appears (TV story)
The Doctor Dances (TV story)
The Doctor Falls (TV story)
Doctor Who (TV story)
Doctor Who Live: The Afterparty
Doctor Who and Crayola (TV story)
Doctor Who and the Silurians (TV story)
The (Doctor) Who (TV story)
Doctor Who: The Bedtime Story (TV story)
The Doctor and the Reindeer (TV story)
The Doctor needs YOUR help! (TV story)
The Doctor's Daughter (TV story)
The Doctor's Meditation (theatrical film)
The Doctor's Wife (TV story)
The Doctor, the Widow and the Wardrobe (TV story)
Doctors Assemble! (webcast)
The Dominators (TV story)
Doomsday (TV story)
Dot and Bubble (TV story)
Dragonfire (TV story)
Dream-Eaters (TV story)
Dreamland (TV story)
Earthshock (TV story)
Earthshock (TotT TV story)
The Eaters of Light (TV story)
The Eclipse of the Korven (TV story)
The Edge of Destruction (TV story)
The Eleventh Hour (TV story)
Empire of Death (TV story)
Empress of Mars (TV story)
The Empty Child (TV story)
The Empty Planet (TV story)
End of Days (TV story)
The End of Time (TV story)
End of the Road (TV story)
The End of the World (TV story)
Enemy of the Bane (TV story)
The Enemy of the World (TV story)
Enlightenment (TV story)
Epsilon/A Fix with Sontarans
Escape to LA (TV story)
The Eternal Mystery (webcast)
The Eternity Trap (TV story)
Eve of the Daleks (TV story)
Everything Changes (TV story)
The Evil of the Daleks (TV story)
Evolution of the Daleks (TV story)
Exit Wounds (TV story)
Extras: The Special (TV story)
Extremis (TV story)
Eye of the Gorgon (TV story)
The Face of Evil (TV story)
Face the Raven (TV story)
The Faceless Ones (TV story)
The Fall of the House of Gryffen (TV story)
The Family of Blood (TV story)
Father's Day (TV story)
Fear Her (TV story)
Fear Itself (TV story)
The Fires of Pompeii (TV story)
First Night (home video)
The Five Doctors (TV story)
The Five(ish) Doctors Reboot (TV story)
A Fix with Sontarans (TV story)
A Fix with Sontarans (home video)
Flatline (TV story)
Flesh and Stone (TV story)
For Tonight We Might Die (TV story)
Forest of the Dead (TV story)
Four to Doomsday (TV story)
Fragments (TV story)
Friend from the Future (TV story)
From Out of the Rain (TV story)
From Raxacoricofallapatorius with Love (TV story)
Frontier in Space (TV story)
Frontios (TV story)
Fugitive of the Judoon (TV story)
Full Circle (TV story)
Fury from the Deep (TV story)
Galaxy 4 (TV story)
The Gathering (TV story)
Genesis of the Daleks (TV story)
The Genuine Article (webcast)
Get Off My Cloud (TV story)
Ghost Light (TV story)
Ghost Machine (TV story)
The Ghost Monument (TV story)
The Gift (TV story)
The Giggle (TV story)
The Girl Who Died (TV story)
The Girl Who Waited (TV story)
The Girl in the Fireplace (TV story)
A Girl's Best Friend (TV story)
Global Conspiracy? (home video)
The God Complex (TV story)
A Good Man Goes to War (TV story)
Good Night (home video)
Good as Gold (TV story)
Goodbye, Sarah Jane Smith (TV story)
The Great Detective (TV story)
The Greatest Show in the Galaxy (TV story)
Greeks Bearing Gifts (TV story)
The Green Death (TV story)
Gridlock (TV story)
The Gunfighters (TV story)
The Halloween Apocalypse (TV story)
The Hand of Fear (TV story)
The Happiness Patrol (TV story)
The Haunting of Villa Diodati (TV story)
Heaven Sent (TV story)
Hell Bent (TV story)
A Hero like the Doctor (webcast)
Hide (TV story)
The Highlanders (TV story)
The History of the Doctor (TV story)
The Horns of Nimon (TV story)
Horror of Fang Rock (TV story)
Hound of the Korven (TV story)
Human Nature (TV story)
The Hungry Earth (TV story)
The Husbands of River Song (TV story)
The Ice Warriors (TV story)
The Idiot's Lantern (TV story)
Image of the Fendahl (TV story)
Immortal Sins (TV story)
The Impossible Astronaut (TV story)
The Impossible Planet (TV story)
In the Forest of the Night (TV story)
Inferno (TV story)
The Infinite Quest (TV story)
The Inforarium (home video)
Into the Dalek (TV story)
Invasion of Earth (TV story)
The Invasion of Time (TV story)
Invasion of the Bane (TV story)
Invasion of the Dinosaurs (TV story)
The Invisible Enemy (TV story)
It Takes You Away (TV story)
It's Showtime (TV story)
Jaws of Orthrus (TV story)
Journey to the Centre of the TARDIS (TV story)
Journey's End (TV story)
The Keeper of Traken (TV story)
Kerblam! (TV story)
The Keys of Marinus (TV story)
The Kidnappers (TV story)
Kill the Moon (TV story)
Kinda (TV story)
The King's Demons (TV story)
Kiss Kiss, Bang Bang (TV story)
Knock Knock (TV story)
The Korven (TV story)
The Krotons (TV story)
Last Christmas (TV story)
The Last Day (TV story)
Last Night (home video)
The Last Oak Tree (TV story)
The Last Precinct (TV story)
The Last Sontaran (TV story)
Last of the Time Lords (TV story)
The Lazarus Experiment (TV story)
The Legend of Ruby Sunday (TV story)
Legend of the Sea Devils (TV story)
The Leisure Hive (TV story)
Let's Kill Hitler (TV story)
Liberation (TV story)
Liberty Hall (home video)
The Lie of the Land (TV story)
Listen (TV story)
The Lodger (TV story)
Logopolis (TV story)
The Long Game (TV story)
The Lost (TV story)
The Lost Boy (TV story)
Lost Library of Ukko (TV story)
Lost in Time (TV story)
Love & Monsters (TV story)
The Macra Terror (TV story)
The Mad Woman in the Attic (TV story)
The Magician's Apprentice (TV story)
The Making of the Gunslinger (webcast)
The Man Who Never Was (TV story)
The Man from MI.5 (TV story)
Marco Polo (TV story)
The Mark of the Berserker (TV story)
The Mark of the Rani (TV story)
The Masque of Mandragora (TV story)
The Massacre (TV story)
Mawdryn Undead (TV story)
Meanwhile in the TARDIS (home video)
Meat (TV story)
Meglos (TV story)
Message from the Doctor (webcast)
The Metaphysical Engine, or What Quill Did (TV story)
The Middle Men (TV story)
Midnight (TV story)
The Mind Robber (TV story)
The Mind Robber (TotT TV story)
Mind Snap (TV story)
The Mind of Evil (TV story)
Mindwarp (TV story)
Mission to the Unknown (TV story)
Mona Lisa's Revenge (TV story)
The Monster of Peladon (TV story)
The Moonbase (TV story)
Mummy on the Orient Express (TV story)
Music of the Spheres (TV story)
Mutant Copper (TV story)
The Mutants (TV story)
The Mysterious Planet (TV story)
The Myth Makers (TV story)
The Naked Truth (TV story)
The Name of the Doctor (TV story)
New Earth (TV story)
The New World (TV story)
The Next Doctor (TV story)
Night Terrors (TV story)
The Night of the Doctor (TV story)
A Night with the Stars (TV story)
The Nightmare Man (TV story)
Nightmare in Silver (TV story)
Nightmare of Eden (TV story)
Nightvisiting (TV story)
Nikola Tesla's Night of Terror (TV story)
On Through the 80's! (TV story)
Once, Upon Time (TV story)
Oroborus (TV story)
Orphan 55 (TV story)
Out of Time (TV story)
Oxygen (TV story)
P.S. (webcast)
The Pandorica Opens (TV story)
Pantheon of Discord (audio story)
Paradise Towers (TV story)
The Parting of the Ways (TV story)
Partners in Crime (TV story)
The Pilot (TV story)
"The Pilot Episode"
The Pirate Planet (TV story)
The Pitch of Fear (TV story)
Planet of Evil (TV story)
Planet of Fire (TV story)
Planet of Giants (TV story)
Planet of the Daleks (TV story)
Planet of the Dead (TV story)
Planet of the Ood (TV story)
Planet of the Spiders (TV story)
The Poison Sky (TV story)
Police 5: The Master (TV story)
Pond Life (webcast)
The Power of Kroll (TV story)
The Power of Three (TV story)
The Power of the Daleks (TV story)
The Power of the Doctor (TV story)
Praxeus (TV story)
Prequel to Asylum of the Daleks (webcast)
Prequel to Let's Kill Hitler (webcast)
Prequel to The Curse of the Black Spot (webcast)
Prequel to The Impossible Astronaut (webcast)
Prisoner of the Judoon (TV story)
Prologue (webcast)
The Promise (webcast)
Proteus (TV story)
The Pyramid at the End of the World (TV story)
Pyramids of Mars (TV story)
Pyramids of Mars (TotT TV story)
Rain Gods (home video)
Random Shoes (TV story)
The Real McCoy (TV story)
The Rebel Flesh (TV story)
Regeneration (TV story)
The Reign of Terror (TV story)
Remembrance of the Daleks (TV story)
Rendition (TV story)
The Rescue (TV story)
Reset (TV story)
Resolution (TV story)
Resurrection of the Daleks (TV story)
The Return of Doctor Mysterio (TV story)
Return of the Autons (webcast)
Revelation of the Daleks (TV story)
Revenge of the Cybermen (TV story)
Revenge of the Slitheen (TV story)
Revolution of the Daleks (TV story)
The Ribos Operation (TV story)
The Rings of Akhaten (TV story)
Rise of the Cybermen (TV story)
Robot (TV story)
Robot Gladiators (TV story)
Robot of Sherwood (TV story)
The Robots of Death (TV story)
Rogue (TV story)
The Romans (TV story)
Rory's Story (webcast)
Rosa (TV story)
Rose (TV story)
The Runaway Bride (TV story)
The Satan Pit (TV story)
The Savages (TV story)
School Reunion (TV story)
The Sea Devils (TV story)
Search Out Space (TV story)
Secret Code (webcast)
The Secret of Novice Hame (webcast)
Secrets of the Stars (TV story)
The Seeds of Death (TV story)
The Seeds of Doom (TV story)
The Sensorites (TV story)
Shada (TV story)
The Shakespeare Code (TV story)
Silence in the Library (TV story)
Silver Nemesis (TV story)
Sirens of Ceres (TV story)
Sky (TV story)
Sleep No More (TV story)
Sleeper (TV story)
Small Worlds (TV story)
Smile (TV story)
Smith and Jones (TV story)
The Smugglers (TV story)
Snakedance (TV story)
The Snowmen (TV story)
Something Borrowed (TV story)
The Sontaran Experiment (TV story)
The Sontaran Stratagem (TV story)
The Sound of Drums (TV story)
Space (TV story)
Space Babies (TV story)
The Space Museum (TV story)
The Space Pirates (TV story)
Spearhead from Space (TV story)
Sprout Boy meets a Galaxy of Stars (TV story)
Spyfall (TV story)
The Star Beast (TV story)
State of Decay (TV story)
Step Into the 80's! (TV story)
The Stolen Earth (TV story)
The Stones of Blood (TV story)
Storm Warning (audio story)
Summer Scene (TV story)
The Sun Makers (TV story)
Survival (TV story)
Survivors of the Flux (TV story)
Susan and the Daleks (TV story)
Sven and the Scarf (webcast)
Symphony of the Daleks (TV story)
The Talons of Weng-Chiang (TV story)
Taphony and the Time Loop (TV story)
Tardisode 1
Tardisode 10
Tardisode 11
Tardisode 12
Tardisode 13
Tardisode 2
Tardisode 3
Tardisode 4
Tardisode 5
Tardisode 6
Tardisode 7
Tardisode 8
Tardisode 9
The Temptation of Sarah Jane Smith (TV story)
The Tenth Planet (TV story)
Terminus (TV story)
Terror of the Autons (TV story)
Terror of the Vervoids (TV story)
Terror of the Zygons (TV story)
They Keep Killing Suzie (TV story)
Thin Ice (TV story)
Think You've Seen It All... Think Again! (TV story)
The Three Doctors (TV story)
... further results
<ul><li>The part "|" of the query was not understood.Results might not be as expected.</li> <!--br--><li>The part "?writer" of the query was not understood.Results might not be as expected.</li></ul>


The list always appears in a collapsed state — a condition which cannot be changed by using this template. Also the list is organised in alphabetical order of the title of the story, but it respects {{TitleSort}}. This means that articles at the beginning of titles are not considered during alphabetisation.

More complicated cases

When the {{PAGENAME}} doesn't match the property name

Maybe the name of the page you're working on is visual effects producer but the property is Property:VFX producer. In this case, you'll have to make a slight modification: {{job table|job1=VFX producer}}. This ability to change the property name comes in handy when you want to drop on of these tables onto a completely different page, as was done above with the table of writers.

When there's a lot of output

For some of the more ubiquitous titles, like writer, you'll probably want to break the table down into smaller tables — logically, one for each show. Or maybe you're working on a series page where you want to show only the writers for that particular series. In these cases you'll want to narrow the category down. For instance, {{job table|job1=DOP|cat=Series 5 (Doctor Who) stories}} will show you all the directors of photography for series 5.


Limitations

As of May 2012, there are a lot of limitations. At present, you can only categorise one element. This means you can't sort by the story number or the series number — nor can you put, say, directors and cinematographers in the same table — all of which would clearly be desirable. You also can't affect the titles in the headers.

However, none of these problems is likely insoluble. And there's certainly a way to do all of that with SMW, manually. These functionalities have merely not been integrated into this template as of yet.

How it works

General comments

This template is powered by SMW, a powerful extension to the standard MediaWiki software which allows the creation of truly relational data. A large part of the reason this template works is because properties have been applied to {{wales crew}}. This means that all the work that has been done on filling out credits on story pages has not been a vanity project. Now we are armed with a vast and complicated database of information about the people who have worked on Doctor Who since 1996. Our database on 1963-era Doctor Who still needs to be built.

Specifics of the template

This template uses a standard #ask: query, but then pumps the results through three additional templates. The head of the tables is created by {{job table head}}, while {{job table foot}} closes the table. The guts — that is, the nitty-gritty of format each row of text — is handled by {{job table core}}.

It looks like this:

1.  {{#ask:[[Category:{{{cat|Television stories}}}]] [[{{{job1|{{PAGENAME}} }}}::+]] 
2.  | ? {{{job1|{{PAGENAME}} }}} 
3.  |limit=500
4.  |format=template
5.  |template=job table core
6.  |introtemplate=job table head
7.  |outrotemplate=job table foot
}}

To put this into plain English:

  1. asks of a category, usually Television stories, what are the names of all the people who did job1?
  2. creates a column with the names of the people who did the job1 (or, if undefined, the job with the name of the page)
  3. limits the output to 500 people
  4. sets the format of the output to template, meaning that it will pump the output through a template
  5. defines the name of the template handling the bulk of the data, in this case {{job table core}}
  6. defines which template is called before the first line of raw data. In other words, it calls the template that creates the template headers. At a minimum, this template must have {| in it.
  7. defines what comes after the last line of raw data. In other words, it call the template that closes the template. At a minimum, this template must have |} in it.