Template:APIQuery categorymembers: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Davidwr This template can be used at the top of maintenance categories to create a link to //en.wikipedia.org/w/api.php?action=query&list=categorymembers to provide lists in XML, JSON, or other formats. Can be sorted and filtered by namespace |
meta>Davidwr add CATPAGE parameter |
||
Line 1: | Line 1: | ||
{{plain link|1=//en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category%3A{{PAGENAMEE}}&cmprop={{{cmprop|title}}}&cmlimit=500&cmnamespace={{{cmnamespace|}}}&format={{{format|xml}}}{{#if: {{{cmsort|}}}|&cmsort={{{cmsort}}}}}{{#if: {{{cmdir|}}}|&cmdir={{{cmdir}}}}} {{#ifeq: {{{cmnamespace|0}}}|0|article|{{ns:{{{cmnamespace|0}}}}} }} }} | {{plain link|1=//en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category%3A{{{CATPAGE|{{PAGENAMEE}}}}}&cmprop={{{cmprop|title}}}&cmlimit=500&cmnamespace={{{cmnamespace|}}}&format={{{format|xml}}}{{#if: {{{cmsort|}}}|&cmsort={{{cmsort}}}}}{{#if: {{{cmdir|}}}|&cmdir={{{cmdir}}}}} {{#ifeq: {{{cmnamespace|0}}}|0|article|{{ns:{{{cmnamespace|0}}}}} }} }} | ||
<noinclude> | <noinclude> | ||
{{documentation}}<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> | {{documentation}}<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> | ||
</noinclude> | </noinclude> |