Template:DPL from category

From FrathWiki
Revision as of 05:13, 1 July 2009 by Melroch (talk | contribs)
Jump to navigationJump to search


Usage

  {{DPL from category 
  | category=somecategory
  | heading=listheading
  | namespace=some-namespace-other-than-main
  | columns=number-of-columns
  | notcategory=excluded-category OR exclude category=excluded-category
  }}

  OR

  {{DPL from category 
  | somecategory 
  | listheading
  | excluded-category
  | some-namespace-other-than-main
  | number-of-columns
  }}

Named parameters can come in any order. Unnamed parameters must be in the order shown; to skip one of them leave a blank between two pipes.

All parameters except category/the first unnamed parameter are optional!

Parameters

category
the category whose member pages should be listed
heading
the (level two) heading to go above the table. Leave a blank value for a list with no heading.
namespace
the namespace listed pages should belong to. The default is Main.
columns
the number of columns in the output table. The default is 2.
notcategory
names a category which should be excluded frem the list.

What this template does

This template calls the Dynamic Page List extension to generate a list of the pages in a given category and its subcategories.

To get your page on such a list include it into the relevant category or one of its subcategories. Practically it means putting the text [[Category:category-name]] (where category-name should be replaced by the name of any of the relevant category or one of its subcategories, which you will find listed if you type "Category:category-name" in the wiki search box and hit enter. Traditionally such category tags go in a group at the bottom or top of the page, so that they can easily be found and edited, but nothing will be broken if you (accidentally) put them somewhere else or add something before or after them. There is no need to include your page both in the top category and one or more of its subcategories, and it will be listed here only once even if you do (and there may be a good reason to do so: your page may be a legitimate member of e.g. all of Category:Conlangs, Category:Conlangs by 3.149.214.223 and Category:Indo-European conlangs!)

Why a dynamically generated list is preferable

There are several reasons why a dynamically generated list is preferable to a manually generated list:

  • You need to edit only in one place, the page you want listed. (Unless you assign it a hitherto non-existing category in which case you will need to add that category as a subcategory of the top category referenced by the dynamic list or one of its existing subcategories, for which see below.)
  • You should anyway assign your page to the appropriate category or categories, so that people with a general rather than particular idea of what they are looking for can find it. The dynamic list creates an extra road to your page in one fell swoop!
  • If you should change the name of/move the listed page (or ask a sysop to do it for you), or add/remove/change your page's subcategory the dynamic list will be automatically updated.
  • The list will be automatically alphabetized. (Unfortunately not ignoring punctuation for the time being!)

Your own subcategory

You can easily create your own category (e.g. Category:Conlangs by 3.149.214.223) just by putting a category tag [[Category:your-category]] on your page. If you think it should be included in a list created with this template just go to the page Category:your-category (where of course "your-category" should be replaced by the actual name of your category; please don't actually edit Category:your-category!) by clicking on the category link at the bottom of your page, or type "Category:your-category" in the wiki search box and hit enter, then add [[Category:top-category]], where of course "top-category" should be replaced by the actual category name referenced by the dynamic list you want your subcategory to go into!) to the text of the category page of the subcategory to be.