Template:Subpages/doc

From Black Cat Studios
< Template:Subpages
Revision as of 02:30, 20 June 2023 by Blackcat (talk | contribs) (Created page with "{{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> ===Usage=== <code><nowiki>{{subpages}}</nowiki></code> shows all the subpages of a given page. It should not be used in the main namespace, only on pages such as user pages, Wiktionary pages and appendices. It takes one, optional parameter, the target page name. The default is <nowiki>{{PAGENAME}}</nowiki> * <code><nowiki>{{subpages}}</nowiki></code>: shows the subpages fo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Usage

{{subpages}} shows all the subpages of a given page. It should not be used in the main namespace, only on pages such as user pages, Wiktionary pages and appendices. It takes one, optional parameter, the target page name. The default is {{PAGENAME}}

  • {{subpages}}: shows the subpages for the current page (in this case, Template:subpages)
  • {{subpages|User:Example}}: shows the subpages for User:Example

Alternative

You can also embed the Special:PrefixIndex directly, e.g.

{{Special:Prefixindex|prefix=User:Example/|hideredirects=1|stripprefix=1}}

If you want use in your wiki a sorted lists of subpages, or get counts of it for using in templates, you may try extension Extension:SubPageList. Example using of this, see wiki code of template Template:pages. It's alternative solution without tag <pages> for pages of books from the Extension:ProofreadPage. This template generate i.e. content of page The Birch-Bark Roll 1906 (kniha). It is solution without dependency on the Lua modules.