Template:EchoPageCat: Difference between revisions

From OER in Education
No edit summary
No edit summary
 
Line 1: Line 1:
<includeonly>{{#ifeq: {{#ask: [[{{{1}}}]] [[Category:{{{2}}}]] |format=|link=none}} |||[[:Category:{{{2}}}|{{{2}}}]]}}</includeonly><noinclude>
<includeonly>{{#ifeq: {{#ask: [[{{{1}}}]] [[Category:{{{2}}}]] |format=|link=none}} |||[[:Category:{{{2}}}|{{{2}}}]]}}</includeonly><noinclude>


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>
  <nowiki>{{EchoPageCat|Cloning|Science}}</nowiki>
  <nowiki>{{EchoPageCat|Cloning|Non-existant category}}</nowiki>
to give
  {{EchoPageCat|Cloning|Science}}


  {{EchoPageCat|Cloning|Science}}
Is it in the category Art? This now returns:
  {{EchoPageCat|Cloning|Non-existant category}}
  <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: