Difference between revisions of "Template:IfObjectExists"
Jump to navigation
Jump to search
(Created page with "<noinclude> If the object of given category exists in the encyclopedia, the template returns the object. If it doesn't, it returns an empty string. '''NOTE:''' As any "print...") |
|||
Line 13: | Line 13: | ||
-->{{#if: {{{category|}}}|[[Category:{{{category|}}}]]|}}<!-- add the category if needed | -->{{#if: {{{category|}}}|[[Category:{{{category|}}}]]|}}<!-- add the category if needed | ||
-->[[{{{object|}}}]]<!-- | -->[[{{{object|}}}]]<!-- | ||
− | + | -->}}<!-- | |
-->}}<!-- if object is given | -->}}<!-- if object is given | ||
--></includeonly> | --></includeonly> |
Latest revision as of 19:40, 31 August 2016
If the object of given category exists in the encyclopedia, the template returns the object. If it doesn't, it returns an empty string.
NOTE: As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.
Parameters:
|category=
- the category to search in. If not given, all categories are fair game.|object=
- the object to search for.