Template talk:Dotw: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(Created page with "This template isn't working, as it is always linking to the Generation II games. --~~~~")
 
Line 1: Line 1:
This template isn't working, as it is always linking to the Generation II games. --[[User:Abcboy|Abcboy]] ([[User talk:Abcboy|talk]]) 23:45, 8 December 2012 (UTC)
This template isn't working, as it is always linking to the Generation II games. --[[User:Abcboy|Abcboy]] ([[User talk:Abcboy|talk]]) 23:45, 8 December 2012 (UTC)
== New parameter for specific games section? ==
It would be rather nice if this template had an extra parameter that let us actually link to the appropriate generation.
I made an example of how that might work [[User:Tiddlywinks/Template:Dotw|in my userspace]]. If this template had that code, <code><nowiki>test{{dotw|Su|XY}}</nowiki></code> would give "test{{User:Tiddlywinks/Template:Dotw|Su|XY}}", where you'll notice the superscript links to the X/Y section of the page. I only used the basic game abbreviations for now, but it'd be easy to add other possible variations.
The one disadvantage of the template I made is that it's doing the same switch statement (filtering the days) twice. But since the only way to get around that would be to copy the other switch statement (filtering the games) 7 times, I think this is best.
So can we change this template to function like my userspace template (whether by copying my template here or going for the alternative with lots of repeated code)? [[User:Tiddlywinks|Tiddlywinks]] ([[User talk:Tiddlywinks|talk]]) 20:33, 12 April 2014 (UTC)

Revision as of 20:33, 12 April 2014

This template isn't working, as it is always linking to the Generation II games. --Abcboy (talk) 23:45, 8 December 2012 (UTC)

New parameter for specific games section?

It would be rather nice if this template had an extra parameter that let us actually link to the appropriate generation.

I made an example of how that might work in my userspace. If this template had that code, test{{dotw|Su|XY}} would give "test Su", where you'll notice the superscript links to the X/Y section of the page. I only used the basic game abbreviations for now, but it'd be easy to add other possible variations.

The one disadvantage of the template I made is that it's doing the same switch statement (filtering the days) twice. But since the only way to get around that would be to copy the other switch statement (filtering the games) 7 times, I think this is best.

So can we change this template to function like my userspace template (whether by copying my template here or going for the alternative with lots of repeated code)? Tiddlywinks (talk) 20:33, 12 April 2014 (UTC)