Jump to content

Template:Random page in category: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
fix urlencode
{{#ifeq:{{{type|}}}|subcat|category|{{{type|page}}}}}
Line 1: Line 1:
{{#if:{{#ifeq:{{NAMESPACENUMBER}}|14|*|{{{1<includeonly>|</includeonly>}}}}}
{{#if:{{#ifeq:{{NAMESPACENUMBER}}|14|*|{{{1<includeonly>|</includeonly>}}}}}
|<span class="plainlinks">[//RandomInCategory.toolforge.org/{{urlencode:{{{1|{{PAGENAME}}}}}|WIKI}}?site={{urlencode:{{SERVERNAME}}|WIKI}}{{#if:{{{ns|}}}|&namespace={{urlencode:{{{ns}}}|WIKI}}}}{{#if:{{{type|}}}|&type={{urlencode:{{{type}}}|WIKI}}}}{{#if:{{{action|}}}|&action={{urlencode:{{{action}}}|WIKI}}}} {{{text|Random {{{type|page}}} in {{#if:{{{1|}}}|category {{{1}}}|this category}}}}}]</span>
|<span class="plainlinks">[//RandomInCategory.toolforge.org/{{urlencode:{{{1|{{PAGENAME}}}}}|WIKI}}?site={{urlencode:{{SERVERNAME}}|WIKI}}{{#if:{{{ns|}}}|&namespace={{urlencode:{{{ns}}}|WIKI}}}}{{#if:{{{type|}}}|&type={{urlencode:{{{type}}}|WIKI}}}}{{#if:{{{action|}}}|&action={{urlencode:{{{action}}}|WIKI}}}} {{{text|Random {{#ifeq:{{{type|}}}|subcat|category|{{{type|page}}}}} in {{#if:{{{1|}}}|category {{{1}}}|this category}}}}}]</span>
|{{Error|Error: A category needs to be specified or this template needs to be placed on a category page}}
|{{Error|Error: A category needs to be specified or this template needs to be placed on a category page}}
}}<noinclude>
}}<noinclude>

Revision as of 20:36, 28 June 2020

Random page in this category