Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13248

Add supportsNS variable to templates/xwikivars.vm

    XMLWordPrintable

Details

    • Trivial

    Description

      Since the Nested Spaces feature has been implemented in XWiki, some contrib applications can be improved. An example is the Forum App where the Forums_MyForum/Topic hierarchy became Forums/MyForum/Topic.

      In order to be able to handle both Pre NS and NS cases a variable could be defined in templates/xwikivars.vm like:
      Before XWiki 8.0M2:

      #set ($supportsNS = $services.extension.core.getCoreExtension('org.xwiki.platform:xwiki-platform-model').id.version.compareTo($services.extension.parseVersion('7.2')) >= 0)

      With XWiki 8.0M2+:

      #set ($supportsNS = $services.extension.core.getCoreExtension('org.xwiki.platform:xwiki-platform-model').id.version.compareTo('7.2') >= 0)

      This is related to https://www.xwiki.org/xwiki/bin/view/FAQ/How+can+my+Extension+know+if+XWiki+supports+Nested+Spaces

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            acotiuga Alex Cotiugă
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: