Difference between revisions of "Template:MaybePrev"

From Wikispooks
Jump to navigation Jump to search
(Testing)
 
m
 
Line 1: Line 1:
 
<noinclude>[[Category:String manipulation templates]]'''If subtracting 1 from the last part (after a '/') of this page's title creates a page title which exists, link to that with a small left arrow.''' This is used in infobox headers of annual events such as [[Bilderberg meetings]] or groups such as [[Rhodes Scholar/1989]], to link to the page for the previous year, if it exists.<br/>
 
<noinclude>[[Category:String manipulation templates]]'''If subtracting 1 from the last part (after a '/') of this page's title creates a page title which exists, link to that with a small left arrow.''' This is used in infobox headers of annual events such as [[Bilderberg meetings]] or groups such as [[Rhodes Scholar/1989]], to link to the page for the previous year, if it exists.<br/>
 
''Usage:''<br/>
 
''Usage:''<br/>
<nowiki>{{MaybeNext}}</nowiki></noinclude><includeonly>{{#ifexist: {{Title all but last part}}/{{#expr:{{Title_last_part}}-1}}|[[image:left-arrow.svg|32px|link={{Title all but last part}}/{{#expr:{{Title_last_part}}-1}}|alt=<-|title=Previous year]]}}</includeonly>
+
<nowiki>{{MaybePrev}}</nowiki></noinclude><includeonly>{{#ifexist: {{Title all but last part}}/{{#expr:{{Title_last_part}}-1}}|[[image:left-arrow.svg|32px|link={{Title all but last part}}/{{#expr:{{Title_last_part}}-1}}|alt=<-|title=Previous year]]}}</includeonly>

Latest revision as of 15:06, 1 April 2023

If subtracting 1 from the last part (after a '/') of this page's title creates a page title which exists, link to that with a small left arrow. This is used in infobox headers of annual events such as Bilderberg meetings or groups such as Rhodes Scholar/1989, to link to the page for the previous year, if it exists.
Usage:
{{MaybePrev}}