Difference between revisions of "Template:Automatic archive navigator/Next"
Jump to navigation
Jump to search
imported>Ash |
imported>Ash (Change from sub 9 char to 8 char after truncation problems) |
||
| Line 1: | Line 1: | ||
<includeonly>{{#if:{{Aan/Calc|{{SUBPAGENAME}} }}|<!-- IF Calc shows the page name begins with "Archive" | <includeonly>{{#if:{{Aan/Calc|{{SUBPAGENAME}} }}|<!-- IF Calc shows the page name begins with "Archive" | ||
THEN use the parameter to return the next (or n-th) pagename | THEN use the parameter to return the next (or n-th) pagename | ||
| − | -->Archive {{#expr:{{{1|0}}}+{{str sub|{{SUBPAGENAME}}| | + | -->Archive {{#expr:{{{1|0}}}+{{str sub|{{SUBPAGENAME}}|8|{{#expr:{{str len|{{SUBPAGENAME}}}}-8}}}}}}|<!-- |
ELSE assume the pagename is a pure number | ELSE assume the pagename is a pure number | ||
-->{{#expr:{{{1|0}}}+{{SUBPAGENAME}}}} }}</includeonly><noinclude> | -->{{#expr:{{{1|0}}}+{{SUBPAGENAME}}}} }}</includeonly><noinclude> | ||
This function is used by {{tl|Aan}} to work out the nth page name in a sequence, given an input like '''{{code|<nowiki>{{Aan/Next|n}}</nowiki>}}''' where n is positive or negative | This function is used by {{tl|Aan}} to work out the nth page name in a sequence, given an input like '''{{code|<nowiki>{{Aan/Next|n}}</nowiki>}}''' where n is positive or negative | ||
</noinclude> | </noinclude> | ||
Revision as of 17:14, 30 August 2009
This function is used by {{Aan}} to work out the nth page name in a sequence, given an input like {{Aan/Next|n}} where n is positive or negative