Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-15088

Apply natural sorting to XPage Layouts

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 14.7.12, 15.1.3
    • 14.7.14, 15.3.0
    • None
    • None
    • 2
    • Flagged
    • Orion
    • Cycle Gap Sprint

    Description

      When adding an XPage in the Experience Manager, the entries in the "Page layout" dropdown are not sorted. Expected behavior by a client is that the Page Layout names are sorted.

      The XHR call of the form /_rp/<pageuuid>./item/<sitemapitem-uuid> returns the layouts in random order:

      "states": {
        "channel": {
          "xPageLayouts": {
            "hst:xpages/guide-format": "Guide",
            "hst:xpages/complex-content-article": "Complex Article",
            "hst:xpages/standard-content-article": "Standard Article",
            "hst:xpages/brand-page": "Brand Page",
          }
        },
      

      No sorting is applied in the back end, neither in org.hippoecm.hst.pagecomposer.jaxrs.services.ChannelServiceImpl#getXPageLayouts nor in org.hippoecm.hst.pagecomposer.jaxrs.services.component.HstStateProvider#getStates

          states.put(HstState.CHANNEL_XPAGE_LAYOUTS, channelContext.getXPageLayouts().stream()
                      .collect(toMap(XPageLayout::getKey, XPageLayout::getLabel)));
      

      Attachments

        1. result.png
          173 kB
          Jeroen Hoffman

        Issue Links

          Activity

            People

              jhoffman Jeroen Hoffman
              jhoffman Jeroen Hoffman
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: