Difference between revisions of "Template:SimpleNav"
Jump to navigation
Jump to search
m (Usage notes, decided to give manual overrides solid arguments) |
m (Small fix) |
||
Line 21: | Line 21: | ||
{{#ifexist:{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|Chapter}}}}Illustrations|{{!}} Back to [[{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|Chapter}}}}Illustrations|Illustrations]]}}}}| |
{{#ifexist:{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|Chapter}}}}Illustrations|{{!}} Back to [[{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|Chapter}}}}Illustrations|Illustrations]]}}}}| |
||
{{#ifexist:{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|Chapter}}}}{{#replace:{{#sub:{{PAGENAME}}|{{#rpos:{{PAGENAME}}|Chapter}}}}|{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Chapter}}+7}}}}|{{#expr:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Chapter}}+7}}}}-1}}}}|{{!}} Back to [[{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|Chapter}}}}{{#replace:{{#sub:{{PAGENAME}}|{{#rpos:{{PAGENAME}}|Chapter}}}}|{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Chapter}}+7}}}}|{{#expr:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Chapter}}+7}}}}-1}}}}|Chapter {{#expr:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Chapter}}+7}}}}-1}}]]}}}}}}}}| |
{{#ifexist:{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|Chapter}}}}{{#replace:{{#sub:{{PAGENAME}}|{{#rpos:{{PAGENAME}}|Chapter}}}}|{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Chapter}}+7}}}}|{{#expr:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Chapter}}+7}}}}-1}}}}|{{!}} Back to [[{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|Chapter}}}}{{#replace:{{#sub:{{PAGENAME}}|{{#rpos:{{PAGENAME}}|Chapter}}}}|{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Chapter}}+7}}}}|{{#expr:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Chapter}}+7}}}}-1}}}}|Chapter {{#expr:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Chapter}}+7}}}}-1}}]]}}}}}}}}| |
||
− | {{#ifexist:{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|:}}}}:{{#replace:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|:}} |
+ | {{#ifexist:{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|:}}}}:{{#replace:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|:}}+1}}}}|{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}}}}|{{#expr:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}}}}-1}}}}|{{!}} Back to [[{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|:}}}}:{{#replace:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|:}}+1}}}}|{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}}}}|{{#expr:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}}}}-1}}}}|Volume {{#expr:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}}}}-1}}]]}}}} |
| Return to [[{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|:}}}}|Main Page]] |
| Return to [[{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|:}}}}|Main Page]] |
||
{{#if:{{#sub:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}}}}|{{#pos:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}}}}| }}}}| |
{{#if:{{#sub:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}}}}|{{#pos:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}}}}| }}}}| |
Revision as of 01:07, 23 May 2013
Return to Main Page |
Usage notes: On Full Page pages: simply type in the template: {{SimpleNav}}. The template will take care of the rest. 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 Warning: This template is only guaranteed to work on pages which has their naming conventions CONSISTENT. Specifically: *There must be a colon (:) after the series title; *Both the words Volume and Chapter are in the title, spelled correctly; *The word Volume must immediately precede the volume number; *The word Chapter must immediately precede the chapter number; *For the above two, the latter must succeed the former; and *For the auto-navigate function to work, the s (starting chapter) and e (ending chapter) arguments must be correct and the chapter must IMMEDIATELY succeed the former, with a space in between. Edit notes: {{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|:}}}} produces the title of the series {{#sub:{{PAGENAME}}|{{#rpos:{{PAGENAME}}|:}}}} produces everything after the colon in the title {{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}} produces the zero-based position right after 'e' in the word "Volume" in the title {{#sub:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}}}}| {{#pos:{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|Volume}}+6}}}}| }}}} produces everything after the volume number (including the space immediately after, though this should be ignorable).