Widget:CategoryPages: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
   <div id="categoryPages"></div>
   <div id="categoryPages"></div>
   <script type="text/javascript">
   <script type="text/javascript">
Line 23: Line 24:
     })();
     })();
   </script>
   </script>
<noinclude>
</includeonly><noinclude>
This widget uses the MediaWiki API to request a list of pages within a category, and spits them out into a div. It takes one parameter, which is the category name. This is done on the client side, using JavaScript, which is less than ideal.
This widget uses the MediaWiki API to request a list of pages within a category, and spits them out into a div. It takes one parameter, which is the category name. This is done on the client side, using JavaScript, which is less than ideal. It can only be used once on a page. It is currently only used by [[:Template:Location Tools]].


==Example==
==Example==
Line 36: Line 37:
:The name of the category.
:The name of the category.
[[Category:Widget]]
[[Category:Widget]]
</noinclude>
</noinclude>

Revision as of 01:01, 24 January 2025

This widget uses the MediaWiki API to request a list of pages within a category, and spits them out into a div. It takes one parameter, which is the category name. This is done on the client side, using JavaScript, which is less than ideal. It can only be used once on a page. It is currently only used by Template:Location Tools.

Example

{{#widget:CategoryPages|category=Tools and Equipment in Electronics Area}}

Parameters

category
The name of the category.