Template talk:SimpleNav

From Baka-Tsuki
Jump to navigation Jump to search

Issue: many series have a space between "volume" and the volume number, and similarly on "chapter" and the chapter number. for example

Toaru_Majutsu_no_Index:Volume7_Chapter3 vs Tsurugi_no_Joou_to_Rakuin_no_Ko:Volume_1_Chapter_5

Is this a problem? Also, you might want to have a look at User:Zero2001's work. Beyond this, you're going to run into a lot of small, project or page specific issues.--Saganatsu (talk) 23:31, 17 May 2013 (CDT)

I already accounted for the space between number and Volume/Chapter, actually, and used a #replace for those cases, so the above two examples are no problem. It's only estimated to get messy if there's no space between the volume and chapter, for example Volume1Chapter2. Or if Volume and Chapter aren't spelled out fully and correctly, with the right cases.
Yeah, a few of the project-specific cases churned out headaches, some I can work around and others which might be more trouble than it's worth. As far as I can see there's nothing this can't solve yet, though. SAO's "Author Notes" was specifically built against, and stuff like Zero no Tsukaima's Volume1 Story1 Chapter1 would usually work with the auto-navigate function, and for the ones that don't, one can manually insert the designated page by inserting everything after the volume number (e.g. {{SimpleNav|Story1 Chapter3|Story2 Chapter1}} for the Story1 Chapter4 page). As far as I know this should work with all pages. -Akira (talk) 00:51, 18 May 2013 (CDT)


Issue: Recognizes chapters if not given back/forward but if given back/forward cannot recognize them

How would you fix up Madan no Ou to Vanadis:Volume 08 Prologue and Madan no Ou to Vanadis:Volume 08 Chapter 1?
In the Prologue I tried a |s=1 and it doesn't work. |f=Chapter_1 also doesn't work.
The only thing that works is |f=Volume_08_Chapter_1 but then it will display 'Forward to Volume_08_Chapter_1' even though all I want is 'Chapter 1'
It can recognize if I remove the underscores also but it can't recognize if I remove the volume.
Also, let's say the page name is Chapter1. Can it display as 'Chapter 1' instead of 'Chapter1'? Is there an override directive?
Acolyte (talk) 14:15, 21 July 2014 (CDT)
Ugh... I didn't see that one coming. Um, for the Madan no Ou pages, I didn't account for the fact that some pages would put in a number like "08" instead of just "8". That's why the template's not auto-navigating--it's trying to look for the nonexistent page "Madan no Ou to Vanadis:Volume 8 Chapter 1", and so on. Gonna be a drag to get around...
Anyway, there is a solution for both of your problems--the same solution, and one that I appear to have forgotten to write into the usage section... There're two more arguments called forwardname and backname, or fn and bn for short. As its name implies, it puts up a custom name for whatever the next link is going to be. For V8 Prologue of Madan no Ou, you would have to put in |f=Volume_08_Chapter_1 and then |fn=Chapter 1. The same for your hypothetical Chapter1 page--you won't have to put in anything for the forward argument (assuming all goes well), you just have to put in |fn=Chapter 1.
(As a side note, underscores ( _ ) always count as a space when used in links, so Chapter_1 and Chapter 1 is pretty much equivalent. Only time they'll actually be necessary is on external links, where you actually have to distinguish between the URL and the substitute text. Of course, they're good for readability too.)
Thanks for bringing it up, and hope this helps. -Akira (talk) 14:09, 30 July 2014 (CDT)
Yes that sounds perfect as what I intended. Thanks. Acolyte (talk) 14:32, 30 July 2014 (CDT)