Alpha indexes like in Mediawiki

Hi there. We are considering moving a wiki from MediaWiki to xwiki. Features are looking good but I can’t discover if a xwiki instance of pages can have a standard alphabetical navigation index like this example:

Hoping someone can advise.

Hi David,

Yes, XWik offers a dynamic and filterable table for listing all pages, see https://extensions.xwiki.org/xwiki/bin/view/Extension/Index%20Application#HTableViewofallPages

Thanks

Note that we don’t offer by default a index per say but this seems like something that would needed only for print. Is that your need?

If so you can achieve it easily with scrjpt. It’s probably a 5-10 lines script at most that you can write in a wiki page.

BTW https://dictionary.casrai.org/Category:Terms doesn’t seem to scale that well. Imagine that you have 3 million pages in your wiki…

Thanks for your reply. We need this to be an online navigable feature. Part of our work is to publish online glossaries for our community. This alpha nav is very common in online dictionaries and glossaries. None of our glossaries will need to scale to the magnitude of millions.

Given these clarifications: revised thoughts on achieving in xwiki?

Did you check the page index feature I mentioned? Does it fill your need?

I checked all the examples on that page but could not find an alphabetical index option. Am I missing a section there?

I still don’t understand your need. Isn’t the need of an index to list all the pages that exist? And to be able navigate to them? Even to be able to filter pages (like pages starting with A, B, C, etc?

That’s exactly the feature provided by the XWiki Page Index.

So is this script-writing approach how best to achieve my goal? Is this a scripting language native to xwiki?

If you really want a non-performant ( :slight_smile: ) way to implement an index page and that displays A, B, Z heading, yes, scripting is the only way.

Yes scripting is native in XWiki, see https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Scripting/

To give you a taste, here’s how you’d list all pages in a wiki and display them in a list:

{{velocity}}
#foreach ($page in $services.query.xwql('').execute())
  * [[$page>>$page]]
#end
{{/velocity}}

Yes, that is precisely the need. In the page you linked to me I just wasn’t seeing an example that showed the A, B, C, nav. If scripting is the way to go I will explore this path.

Note: You can test it live here: https://playground.xwiki.org/xwiki/bin/view/Main/AllDocs

Also note that there’s a reason we don’t have this feature and why we have our Page Index: it’s because it’s a lot more useful and performant to have this dynamic table. I still fail to see your use case and why seeing A, B, … Z headings is so important. In term of needs, I believe the Page Index fulfills them: be able to locate a given page by name.