Uploaded image for project: 'Magnolia Site Module'
  1. Magnolia Site Module
  2. MGNLSITE-26

Prevent "freemarker" page templates to be added to an explicitly mapped site

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Major
    • None
    • 1.0
    • api
    • Yes

    Description

      The current implementation of SiteAwareTemplateAvailability & ConfiguredSiteTemplateAvailability does not allow you to achieve following:

      • Filter out pages of renderType "freemarker"

      This means:
      If you add a freemarker page into any module, it will be available in any site of the whole system.
      No way you can filter them out via site.getTemplates().getAvailability().

      The correct behavior for freemarker templates should be (and as it was before 5.4):

      • Freemarker templates can be added to any top level page (don't have a site definition yet).
      • Can't be added to any site with an explicit site definition (not "default")
      • Can be added into any site using the "default" site definition (no explicit mapping int he site definition)

      I added a patch that achieves this. Basically it checks if the current node is a part of a mapped site definition.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                cringele Christian Ringele
                Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Checklists

                    Task DoR