User:Teleuteskitty/Draft Navigation: Difference between revisions

From SGUTranscripts
Jump to navigation Jump to search
m (replaced button graphics)
(added test line for sub#)
 
Line 14: Line 14:


insert page number parameter into template manually
insert page number parameter into template manually


'''or''' use <code><nowiki>{{#sub:{{PAGENAME}}|12|0}} </nowiki></code> (see [http://www.mediawiki.org/wiki/Extension:StringFunctions#.23sub: mediawiki.org StringFunctions])
'''or''' use <code><nowiki>{{#sub:{{PAGENAME}}|12|0}} </nowiki></code> (see [http://www.mediawiki.org/wiki/Extension:StringFunctions#.23sub: mediawiki.org StringFunctions])
Line 20: Line 19:
''should'' give episode number, so, hopefully:
''should'' give episode number, so, hopefully:


<code><nowiki>[[SGU Episode {{#expr: {{#sub:{{PAGENAME}}|11|0}}+1 }}]] </nowiki></code> gives next page
<code><nowiki>[[SGU Episode {{#expr: {{#sub:{{PAGENAME}}|12|0}}+1 }}]] </nowiki></code> gives next page
<!-- :[[SGU Episode {{#expr: {{#sub:SGU Episode 350|12|0}}+1 }}]] -->
<!-- :[[SGU Episode {{#expr: {{#sub:SGU Episode 350|12|0}}+1 }}]] -->


===Test===
If the following contains just a number and a link, #sub is working:
<br>{{#sub:SGU Episode 350|12|0}} <br>
[[SGU Episode {{#expr: {{#sub:SGU Episode 350|12|0}}+1 }}]]


{|style="width:80%; margin: 1em auto 1em auto;"
{|style="width:80%; margin: 1em auto 1em auto;"

Latest revision as of 20:38, 9 May 2012

Add links to previous page, top of page (or main page), next page (no links added as yet)


{{#expr: 350+1 }} = 351

Therefore: [[SGU Episode {{#expr: 350+1 }}]] gives: SGU Episode 351


Either

insert page number parameter into template manually

or use {{#sub:{{PAGENAME}}|12|0}} (see mediawiki.org StringFunctions)

should give episode number, so, hopefully:

[[SGU Episode {{#expr: {{#sub:{{PAGENAME}}|12|0}}+1 }}]] gives next page


Test[edit]

If the following contains just a number and a link, #sub is working:
350
SGU Episode 351

Navi-previous.png SGU HRes Logo sm.gif Navi-next.png