Hi;
I have this pages:
Title/1 Title/2 Title/3 ...
I would want a Template to have a NEXT button on each page.
Is there any way to add +1 to {{SUBPAGENAME}} or something like that?
---- ES
Tengo estas páginas:
Título/1 Título/2 Título/3 ...
Quisiera una Plantilla para tener un botón de PASA-SIGUIENTE en cada página.
¿Hay alguna forma de sumar +1 a {{SUBPAGENAME}} o algo parecido?
Is there any way to add +1 to {{SUBPAGENAME}} or something like that?
The expr function in http://www.mediawiki.org/wiki/Extension:ParserFunctions might do the job.
Thank you Thomas.
I have my PREVIOUS and NEXT buttons/links working now:
PREVIOUS:
{{#ifeq:{{SUBPAGENAME}}|1|[[{{BASEPAGENAME}}| Mainpage]]|[[{{BASEPAGENAME}}/{{ #expr:{{SUBPAGENAME}}-1}}|Previous]]}}
NEXT:
{{exists | page={{BASEPAGENAME}}/{{#expr:{{SUBPAGENAME}}+1}} | then=[[{{BASEPAGENAME}}/{{ #expr:{{SUBPAGENAME}}+1}}|Next]] | else= }}
Here I use the "exist template"* from "meta" because #ifexist didn't evaluate {{BASEPAGENAME}}/{{#expr:{{SUBPAGENAME}}+1}} as a page.
* http://meta.wikimedia.org/wiki/Template:Exists
I'm using these links in pages like:
Title Title/1 Title/2 ...
El dt 07 de 10 del 2008 a les 21:26 +0100, en/na Thomas Dalton va escriure:
Is there any way to add +1 to {{SUBPAGENAME}} or something like that?
The expr function in http://www.mediawiki.org/wiki/Extension:ParserFunctions might do the job.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org