Jump to content
  • 0

List pages without the subpages


Charles-François D.

Question

Hi,

I want to list the pages inside one's page but without all the subpages is that even possible ?

This is what I'm using right now :

{{Special:PrefixIndex/{{FULLPAGENAME}}/ |columns=1 |hideredirects=1 |stripprefix=1}}

And it output something like :

Client1/Contact
Client1/Contact/External
Client1/Contact/Internal
Client2/Contact
Client2/Contact/External
Client2/Contact/Internal

And I want something like :

Client1
Client2

Thanks !

 

Charles

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

This does not seem to be possible using only Special:PrefixIndex, so some other extension will be needed to generate this list. DynamicPageList can probably do it, but is likely overblown for your use case. It is possible to do this with a Scribunto module as well. I believe it should also be possible to omit the sub-pages from the PrefixIndex listing using a combination of ParserFunctions and StringFunctions (StringFunctions are included in the ParserFunctions extension, but are disabled by default), but it will be more limited in terms of functionality (can only support up to a hardcoded number of pages).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.