Jump to content

Template:CategoryList: Difference between revisions

From Squirrel's Lair
Ttenbergen (talk | contribs)
Created page with "<noinclude> This template adds a listing of '''all articles in a category''', taking the category name as parameter. It excludes the page itself. To use, copy and paste foll..."
 
Ttenbergen (talk | contribs)
No edit summary
Tag: Manual revert
 
(4 intermediate revisions by the same user not shown)
Line 7: Line 7:
{{CategoryList | <category name>}}</pre>
{{CategoryList | <category name>}}</pre>


Example:
{{#cargo_query:
{{#cargo_query:
tables=_pageData
tables=_pageData
Line 12: Line 13:
|where=_categories HOLDS 'Interactive Display' and _pageName!="N/A" and not _pageName Like "Category:%"
|where=_categories HOLDS 'Interactive Display' and _pageName!="N/A" and not _pageName Like "Category:%"
|limit=5000
|limit=5000
|format=ul
|default=none found
|default=none found
}}
}}


</noinclude>
</noinclude><onlyinclude>{{#cargo_query:
 
 
{{#cargo_query:
tables=_pageData
tables=_pageData
|fields=_pageName
|fields=_pageName
|where=_categories HOLDS 'Section' and _pageName!="N/A" and not _pageName Like "Category:%"
|where=_categories HOLDS '{{{1}}}' and _pageName!="N/A" and not _pageName Like "Category:%"
|limit=5000
|limit=5000
|format=ul
|default=none found
|default=none found
}}
}}</onlyinclude>

Latest revision as of 19:50, 2021 October 27

This template adds a listing of all articles in a category, taking the category name as parameter. It excludes the page itself.

To use, copy and paste following to the end of most new articles just above the categories:

{{CategoryList | <category name>}}

Example:

none found