Template Store Proposal

Hi everyone!

I’d like to propose something that could definitely take a lot of work, but could also offer big results.

Lately I’ve been thinking that people don’t see the value of XWiki quickly enough.

We all know how powerful XWiki is. The software can do so much: it can act as a knowledge base or as a website, it has the ability to keep track of inventory, personnel and their vacation days, it can even generate PDFs for official company documents. There’s a lot of value that XWiki could bring to any company. It’s literally the Swiss Army Knife of such tools.

That’s why it’s a shame that so many people dismiss it so quickly.

One way of changing this perception could be through the implementation of a Template Store. I mean, there’s probably a reason why XWiki’s biggest competitors offer such a feature (e.g: Notion, Confluence).

The ability to create templates is already baked into XWiki, however sharing them could be easier.

The way I’d imagine it, there would be a website full of user created and “official” templates – similar to how extensions are currently handled ( extensions.xwiki.org ).

Templates should be downloadable both as a single page, that could be used by any user with editing rights on the wiki, and also as a global template, that can only be added by an admin, but after it would be visible as an option whenever users create new pages.

The Template Store should also offer a way of seeing how a template looks, either through a live, hosted version of the template, or through an image that captures the whole page.

It would also be great if templates would be searchable from within XWiki itself, like extensions are through the extension manager.

I know it’s not something that could be easily done, I know it would take a lot of time for such a set of features to be implemented. However, I still think it could be worth it.

Not only would a Template Store be helpful to new users, making them understand the value of XWiki faster, it would also help with the productivity of existing XWiki users, as they might be able to find a template for what they’re trying to achieve, and won’t have to start a new page from scratch.

What do you think? Any feedback is welcome.

Thank you for the suggestion! This might not be the solution you imagined, but in fact, templates can already be packaged and installed as a regular extension. So in other words, we already have the “template store” - it’s the extension repository. And we already have a way to install them - it’s the extension manger. In fact, the templates that we bundle by default are an extension. We might want to make template extensions more visually appealing, like making a screenshot an integral part of the extension definition and showing these screenshots in the extension listing, but this would be an improvement for any extension. We could make templates also more visible by making them a separate category (unless we already have them).

Regarding installing templates as a user, there are two issues:

  1. Currently, we don’t have the concept of templates only visible to a user. A template is always visible to all users.
  2. An extension defines where the extension is installed and quite frequently these are locations only admins can edit. Therefore, it is quite hard to install an extension as a user. To make things worse, there is no place in XWiki for user-specific pages.

So I think this would be a bigger improvement while making template extensions more visible should actually be fairly simple.

Oh, wow. I didn’t know about this.
Is there any documentation on how to package a template as an extension?

This would definitely be a big plus in my book. Letting people see how the template looks before they install it, hopefully within the extension manager as well, would definitely help.

I guess it would be fine for templates to only be installable by admins. However, if that’s the case, templates should definitely be more visible to both admins and regular users (so regular users could ask the admin to install whichever template they might need).

There’s a concept of components in the Extension Manager (EM) store. We"ve used this so that macros packaged inside extensions can be seen by the EM and be displayed for example in the WYSIWYG editor dialog for macros. See for example: jira/jira-macro/jira-macro-platform/pom.xml at master · xwiki-contrib/jira · GitHub

So I guess the same could be done for templates.

I think what’s missing is the ability in the EM search to filter based on extensions containing a type of components.

EDIT: You can filter but it’s something advanced and you need to know the syntax, see https://www.xwiki.org/xwiki/bin/view/ReleaseNotes/Data/XWiki/13.3RC1/Entry007/

Searching for component_macro:* will list all extensions containing declared macros.

The only issue I guess is that Page Templates are not components so we cannot reuse this concept directly…