Move Templates Application to xwiki-platform

Hi everyone,

Following the move of the Tour Application to xwiki-platform, I think it makes sense to do the same with the Templates Application which is also bundled in XWiki Standard by default (although it is maintained as a contributed extension).

The Template Application is currently providing 4 templates: Article, Encyclopedia, Meeting and SimplePage. The big question is where to move these templates inside xwiki-platform.

  1. In separate modules: @tmortagne suggested that ideally these templates should be organized by domain, e.g. put the Meeting template in a module for the “meeting” domain. The issue is that we don’t have modules dedicated to these domains in platform (Article, Encyclopedia, Meeting) and I’m not sure if it’s worth creating these modules just to put there a single template.
  2. In the same module. I see a couple of options here:
    1. Move them to xwiki-platform-administration-ui, the reason being that there we have the TemplateProvider* pages that the Templates Application relies on
    2. Create xwiki-platform-template-ui; we already have xwiki-platform-template-api but it’s about Velocity templates, not wiki page templates, so it can be misleading, as @tmortagne noted. One advantage could be that if we create this module then we could move the TemplateProvider*pages from xwiki-platform-administration-ui (which is definitely not the right place for them).
    3. Create xwiki-platform-template-page or xwiki-platform-template-provider, inside xwiki-platform-template, making it more clear from the name that this is about page templates. Of course, if we do this, we should move here all TemplateProvider* pages.
    4. Create a new top level module xwiki-platform-pagetemplate or xwiki-platform-templateprovider or something like that.
    5. Move them to the flavor, e.g. xwiki-platform-distribution-flavor-common

To me the best option is 2.2, seconded by 2.3. WDYT?


I really don’t like 2.2. and 2.3. since it’s a completely different domain than the already existing xwiki-platform-template. -1 for me.

I, too, prefer moving stuff out of xwiki-platform-administration-ui so +1 for 2.4.. Not sure which is the best name.

1. would have been nice but yes, honestly it does not worth starting a new domain for each single page template.

I understand that xwiki-platform-template-api is (currently) about file system templates, but that’s a submodule of xwiki-platform-templates which sounds generic enough to me to include other template related modules. I don’t think it’s that bad to group file system templates and wiki page templates under the same top level module xwiki-platform-templates. Sure, using xwiki-platform-template-ui is probably not the right thing, but we could have instead something like:

        xwiki-platform-template-page-provider (move here all TemplateProvider* pages from xwiki-platform-administration-ui)
        xwiki-platform-template-page-content (move here all 4 templates from the Templates Application; separate module so that it can be uninstalled without loosing the ability to create other template)

Note that this is not much different than the xwiki-platform-image module where we group 3 topics that are not tightly related:

  • image-lightbox
  • image-processing
  • image-style


No, it’s not. It’s about a concept called “template” which can be stored on filesystem, in JAR files or in wiki pages (xobject or attachments of wiki skins).

It’s totally different. Again, the word “template” simply have two totally different meanings here, one is a scripting framework and the other a page factory. It’s not the case for images.

I think we should keep them in a separate module and not move them, e.g., into xwiki-platform-administration-ui as this makes it more difficult to uninstall them/create flavors without them as not everybody wants to have these templates (or do we have another easy feature to disable them?).

What about moving them into xwiki-platform-help-ui or a module like xwiki-platform-help-examples where we could also move other example content like the AWM applications that are mostly example content? Or, if we want to differentiate, create a hierarchy of different modules there?

I don’t see why we would move them into the Help module as it’s not related to help (and users may want to remove the help extension without removing page templates). For me they should go in a module for page templates.

For me it’s related to help, because this is demo content that showcases how to use page templates similar to how we have demo AWM applications for movies or a demo macro in the help application. I would expect that in any wiki that is serious about using templates, these templates would either be customized or just taken as an inspiration.

Ok thanks, I now understand your idea and how you see it as being some demo. It’s also true that the AWM examples currently located in the Help module are demos too.

In order to move them under the Help module, they would need to be used in the Help pages. That’s not too hard to do and to present them as demo page templates.

So I’m not against doing this. We would need to decide if we move them inside the help-ui module or as new modules. The pro of having separate modules (ie separate extensions) is that users can uninstall them separately (they might want to keep the page templates but not the AWM demo pages for example). However, this causes a problem: the main help UI has a dep on them so it would need to be code with some velocity script that adapts the UI display if the pages are not present (or even better, provide a UIXP for extensions to contribute new help topics, and then have help-awm-ui and help-pagetemplates-ui modules bringing both the demo pages + the associate help topics).

The other option, is to tell users to not uninstall but delete pages (marked as demo pages in the pom) that they don’t want to see. That would still cause the problem with the help UI that would have broken links possibly.

So if we want to go the help way, I’d be for the following:

  1. Introduce a UIXP for help topics if we don’t already have one. It’s not too hard since we have a grid of help topics and it’s easy to imagine contributing more cells in that grid.
  2. Move AWM demo pages to some help-awm-ui module and move the help related to AWM there (UIX).
  3. Create a help-pagetemplates-ui module with its UIX.



How do I create a page template for all users

Please don’t hijack threads and start a new one. Thx.

I don’t think this is the goal of these templates. If that were the goal then we would have only one template. But we have 4 and should have more. Because the goal is actually to provide some standard page content layouts that the end user can start from. These templates are listed in the Create Page dialog and the users are creating pages based on them. I doubt the users are seeing these as demo templates.

I agree here, I really don’t think it’s the same intent as other demo content we provide. At least there is definitely no reason to delete or modify them like you would for other demo content.

I don’t see how this disqualifies them as demo templates. It just means having several demo templates for several domains. And I agree we should have a lot more, for all domains, just as Notion is doing for example.

PS: Note that your reaction was also my first reaction :slight_smile: But after thinking more about it (and rewriting several times my answer above ;)), I finally came to the conclusion that they could indeed be considered as demo content. Now, I agree that we need to draw a line somewhere, as we could also say that provided Color Themes are demo themes (maybe we should, idk), and maybe more.

I’m not sure that this is correct. There are all reasons to do that in an XWiki instance actually. Because as the wiki owner, you may not want to have pages created based on these templates and your wiki may not be about encyclopedia articles or other topics related to these templates. Thus in almost all cases, you should remove them. This is especially true in all company contexts where you want some oversight about what layout/type of documents your user create.

Note that it’s enough to mark any page that could be removed by users as demo type and that should be enough to support the UC of removing some. We may not need to have them in the help module for this, and I prefer to have demo content located in the “business” model that they are about. For example AWM demo content should IMO be located in the AWM modules (and contribute a help topic using the UIXP I mentioned above).

To make matter worse :), I’m not sure that a Template about Encyclopedia is the same as a Blog post Template brought by the Blog app. For the Blog app, the template is not a demo but a feature. But for sure, users should be able to modify that template if need be.

I think what’s important in the end is just that users are able to modify or delete any “demo” content if they don’t want to use it (marking them as demo in the pom should be enough for this), and that we have a way for extensions that need it, to contribute help (through he UIXP I mentioned).

I’m also proposing that we should move template pages (and demo/help content in general) to the “business” modules they relate to. For the default templates for which there’s no “business” domain we already have (i.e. the 4 we provide ATM), I’d be fine to consider them as help content to go in the help extension as we don’t want to have by default in XS the domains of Encyclopedia, Article, or Meeting (for Simple page, I think we should be able to find a location for it as it’s neutral in term of “business”). But I’d move the AWM examples from the help modules into the AWM module).

BTW, we should remove them on as we don’t want contributing users to use them.

Hi, we need to conclude this topic. So let’s vote:

  • (1) Do you agree to move the Templates Application from xwiki-contrib to xwiki-platform?

  • (2) Where exactly?

    • (2.1) Merge into xwiki-platform-help-ui

      • (2.1.1) Keeping the current page hierarchy (Templates.*)
      • (2.1.2) Moving the templates to the existing Help.Templates.* space
    • (2.2) Create xwiki-platform-help-examples, to group together all sorts of help demo content

      • (2.3.1) Keeping the current page hierarchy (Templates.*)
      • (2.3.2) Moving the templates to the existing Help.Templates.* space
    • (2.3) Create xwiki-platform-help-pagetemplates

      • (2.3.1) Keeping the current page hierarchy (Templates.*)
      • (2.3.2) Moving the templates to the existing Help.Templates.* space
    • (2.4) Create xwiki-platform-pagetemplates (notice the plural), keeping the current page hierarchy (Templates.*)

    • (2.5) Create xwiki-platform-pagetemplate/xwiki-platform-pagetemplate-examples, moving the template provider pages from xwiki-platform-administration-ui to xwiki-platform-pagetemplate/xwiki-platform-pagetemplate-ui

+1 for 2.5 on my side. -0 for the rest.

Please cast your votes!



I definitely prefer 2.5 over 2.4 (if we introduce a new pagetemplate domain, then everything related to that domain should be there) so -1 for 2.4, and I slightly prefer 2.5 it to others too.

1 Like


+1 sounds good to have a dedicated module for that and I agree with what Thomas said regarding 2.4. Now you plan to keep the references of the template page then I guess? Templates.*

+1 for 2.5 as well. Thanks.

+1 for 1 and 2.5.

In addition will need to be moved to the new pagetemplate exo page.

Note that I’m hesitating between the terminology -examples vs -demo, for 3 reasons:

  1. We have a demo type for wiki pages (in the pom.xml) and thus using -demo would make it in sync
  2. On we talk about “demo content”. Thus we would use the same terminology too.
  3. For the GitHub - xwiki-contrib/application-releasenotes: Application to manager release notes extension, I’ve also used the terminology “demo”, see

So I have a small preference for xwiki-platform-pagetemplate/xwiki-platform-pagetemplate-demo.


@surli yes.

1 Like