Help:Generated lists
Note: When you edit this page, you agree to release your contribution under the CC0. See Public Domain Help Pages for more info. |
Wikis are all about being quick
[edit]As much as possible, tasks should be automated to improve efficiency.
Lists that need to be created automatically
[edit]- Wikimedia version
- Descriptions and valid namespaces.
- Wiki syntax table
- Entries in a namespace
- Special
- Use the Special:Allpages page to select and view entries in a specific namespace.
- In-page listings for the main namespace
- For entries in the main namespace, use the
{{Special:Allpages}}
template to display the list directly on a wiki page.
- For entries in the main namespace, use the
- DynamicPageList extension for in-page listings
- For namespaces other than the main namespace, use the DynamicPageList extension to display entries on the page.
- This can be used to list all pages in any namespace (e.g., MediaWiki namespace).
- To work around the requirement to specify a category or notcategory, specify a non-existing category with notcategory. For example:
- Special
Wikitext
<DynamicPageList> count=5 namespace=MediaWiki notcategory=SomethingThatDoesntExist shownamespace=true mode=unordered </DynamicPageList>
Rendering:
- MediaWiki:Preferences-summary
- MediaWiki:Gadget-PagesToTranslate.js
- MediaWiki:Gadget-PagesToTranslate
- MediaWiki:Gadget-Global-PagesToTranslate.js
- MediaWiki:Gadget-Global-PagesToTranslate
Lists that are automatic by default
[edit]- What links here
- Special:ListUsers
- User contributions
- Page history
- Special:Categories
- Special:SpecialPages
Lists with a small number of possible members
[edit]When the number of possible list members is small, each can be shown based on specific conditions, allowing various lists to be created. When generating these lists, it's important to handle separators correctly to avoid superfluous characters like extra commas. A common strategy is to design the template such that the combination of the end of one item and the start of the next forms a suitable separator. For example, using a space or blank line as a separator is straightforward because extra spaces or lines at the end of the list are usually acceptable. In contrast, using a comma requires more careful handling to avoid leaving an unwanted comma at the end of the list.
Extensions
[edit]Semantic MediaWiki (SMW), DynamicPageList, and DPLforum offer different options for generating automatic lists within a page.
For example, in Semantic MediaWiki (SMW), links are grouped by relations. The backlinks of a page can be generated in-page for a specific relation. An in-page list of backlinks ordered by relation may be obtained by a sequence of queries, one for each relation. Additionally, backlinks of backlinks, forward links, and properties of the created pages can be given.