User:GhostInTheMachine/SubPages
|
GhostInTheMachine • Talk • Barnstars • Help • Misc • Modules • Other • Layout • Photos • Projects • Scripts — UBX • drafts • t • test • wip • 2024-08-11 12:51:08 |
Purpose
The script adds a Subpages option after the Talk button on the page menu.
Articles in the main namespace cannot have sub-pages, so the option is not displayed for articles. (This is not quite true, there are some sub-pages in article space, but they tend to be old.)
Use
The new menu option jumps to the special page that lists sub-pages.
Prerequisites
None.
Installing
Add the following line to your common.js file.
{{subst:Lusc|User:GhostInTheMachine/SubPages.js}}
Alternatives
Seems that this is almost the "Hello World!" script ...
- 2012-08-05 User:PrimeHunter/My subpages.js — just the subpages of the current user's page
- 2014-04-08 User:PrimeHunter/Subpages.js — subpages of the current page
- 2018-05-08 User:Bellezzasolo/Scripts/subpages — subpages of the current page
- 2018-09-23 User:BrandonXLF/Subpages — subpages of the current page
From Wikipedia:Subpages#Notes — Add a subpages link to the sidebar Tools menu:
mw.util.addPortletLink ('p-tb', wgServer+wgArticlePath.replace("$1", "Special:PrefixIndex/"+mw.config.values.wgPageName+"/"), 'Subpages');
Possible improvements
- Do not display the button for category pages or files
- Always test for subpages and then only display the button if there are some
- Resolve the burning question of "subpages" vs. "sub-pages".
See also
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.