Template:EchoPageCat: Difference between revisions
From OER in Education
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#ifeq: {{#ask: [[{{{1}}}]] [[Category:{{{2}}}]] |format=|link=none}} |||[[:Category:{{{2}}}]]}}<noinclude> | <includeonly>{{#ifeq: {{#ask: [[{{{1}}}]] [[Category:{{{2}}}]] |format=|link=none}} |||[[:Category:{{{2}}}|{{{2}}}]]}}</includeonly><noinclude> | ||
{{EchoPageCat|Cloning|Science}} | Usage: You can use this to check whether a page is in a category, and if it is, the category is printed: | ||
E.g. Is [[Cloning]] in [[:Category:Science]] ? Use this | |||
<nowiki>{{EchoPageCat|Cloning|Science}}</nowiki> | |||
to give | |||
{{EchoPageCat|Cloning|Science}} | |||
Is it in the category Art? This now returns: | |||
<nowiki>{{EchoPageCat|Cloning|Art}}</nowiki> | |||
nothing: | |||
{{EchoPageCat|Cloning|Art}} | |||
</noinclude> | </noinclude> |
Latest revision as of 12:42, 9 September 2012
Usage: You can use this to check whether a page is in a category, and if it is, the category is printed:
E.g. Is Cloning in Category:Science ? Use this
{{EchoPageCat|Cloning|Science}}
to give
Science
Is it in the category Art? This now returns:
{{EchoPageCat|Cloning|Art}}
nothing: