Template:IfPage

From Minecart Rapid Transit Wiki
Jump to navigation Jump to search

{{{1}}}

Why should I use this template?

This template is designed to be used on pages where a large amount of town names, franchise names, transit company names etc. are being inputted. Rather than checking whether each page exists, then linking to it if it does, just surround the potential page with {{IfPage|#}} where # is the page name. This template checks the page every time a page is loaded. This way, even if the page doesn't exist when you first use the template, if it is created afterwards then the link will automatically be filled in. This is the same for if a page is deleted, then the link will no longer connect.

Please note that due to limitations with the software that the wiki is run on, this template can only be used 500 times per page. I haven't got the patience to find out what happens if it is used more than this.

Usage

{{IfPage|Segville}} will show as Segville as the page exists
{{IfPage|Segville International Waters Treaty}} will show as Segville International Waters Treaty as the page doesn't exist
{{IfPage|Segville|Segville Is Awesome}} will show as Segville Is Awesome