Template:SimpleNav

From Baka-Tsuki
Revision as of 08:14, 16 September 2014 by Zzhk (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Return to Main Page

Please do not edit unless you know what you're doing. If you must experiment, there's a sandbox page at User:AKAAkira/SimpleNav.

About SimpleNav

Advantages:

  • Very simple for newcomers to understand and use
  • Hides nonexistent pages until they're created, at which point it'll automatically update

Disadvantages:

  • Automation feature breaks very easily if pagenames aren't formatted "correctly" or consistently (see below)
  • Due being designed as a single template for many pages, may stress the servers if edited carelessly

Usage

Copy and paste the following:

{{SimpleNav
|back=
|forward=
|startchapter=
|endchapter=
}}

Explanation:

  • |back= is where you place the link to the previous page. You don't need to hyperlink the text; the template will do that for you. You may truncate the text to only the chapter or the volume and chapter, assuming that the text up until then is the same between the name of the page where you place the template and the name of the page you're directing it to. You can put in, for example, Chapter 3', Prologue, Volume 0 Special Chapter, or Volume4 Illustrations. The |back= itself may be truncated to just |b=.
  • |forward= is, like above, where you place the link to the next page. Again, you may truncate the hyperlink to state only the chapter or the volume and chapter if everything up until then is the same. Also, the |forward= itself may be truncated to |f=.
  • |startchapter= is where you put in the number for the first chapter of the current volume. This defaults to 1. It may also be substituted with |s=.
  • |endchapter= is, similarly to above, where you put in the number for the last chapter of the current volume. This is important to put in because there is no way for this template to guess when the chapters end and go into the epilogue. This may also be substituted with |e=.

It's quite possible that you will not have to fill in any of these variables, owing to the automated nature of this template.

Extras:

  • |backname= is used if you want to display a different text over the back link. The argument name itself can be truncated to |bn=. For example, the text "Back to Volume 08 Chapter 1" can be changed to become "Back to Chapter 1" if you put in |bn=Chapter 1.
  • |forwardname= is, same as above, used if you want to display a different text over the forward link, and can be truncated to |fn=.
(May update this later.)
Examples:
 On Full Page pages: simply type {{SimpleNav}}
 On individual chapters: type in {{SimpleNav|s=##|e=##}}, where each respective numbers are the chapter
    that the book Starts and Ends on. For example, SAO v4 contains chapters 5 to 9, so for that, I would
    type in s=5 and e=9. (Note that the s argument defaults to 1, so it's not necessary to type in unless
    the book starts on a chapter other than 1. Also note that the e argument only has to be typed in if
    the page in question links to (i.e. Epilogue, Afterword, Author Notes, or the next volume's Illustrations)
    or is a final chapter.
  If the auto-function doesn't work at all, use the manual override: {{SimpleNav|b=link here|f=link2 here}},
    where each respective "link here"s are the chapter or volume and chapter target. Please note that the
    links must be spelled EXACTLY as it is in the page title/URL (for example, Chapter2 vs Chapter 2).
    Examples:
      To target Zero_no_Tsukaima:Volume1_Story2_Chapter1 from Zero_no_Tsukaima:Volume1_Story1_Chapter3,
      insert f=Story2_Chapter1
      To target Sword_Art_Online:Volume_10_Interlude_II from Sword_Art_Online:Volume_10_Chapter_4,
      insert f=Interlude_II
      To target Zero_no_Tsukaima:Volume4_Prologue from Zero_no_Tsukaima:Volume_3_Chapter_10 (this is not
      chronological, there's the v4 Illustrations in the middle), insert f=Volume4_Prologue

Warnings

The automation feature is only guaranteed to work on pages which has their naming conventions CONSISTENT. Specifically:

  • Doesn't work if there's no colon (:) after the series title;
  • May not work if the word "Volume" isn't in the pagename, or spelled correctly;
  • Doesn't work if the word "Volume" doesn't immediately precede the volume number;
  • Doesn't work if the word "Chapter" or equivalent doesn't immediately precede the chapter number;
  • Doesn't work if there are any more words (e.g. "Preview") after the chapter number;
  • Doesn't work if the chapter number comes before the volume number;
  • Doesn't work if the volume or chapter number are three or more digits;
  • May not work if the volume or chapter numbers are not pure integers (e.g. Volume 1A);
  • Doesn't work (yet) if the volume or chapter numbers are buffered with zeros (e.g. Volume 08);
  • May not work if this is used on a page outside of English.