Uploaded image for project: 'Magnolia pages module'
  1. Magnolia pages module
  2. PAGES-45

Support URL fragments in preview mode

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 5.4.11, 5.5.3
    • 5.4.1
    • None
    • Kromeriz 87
    • 5

      In the preview mode we have a menu that uses a url fragment identifier (#part) of the url.
      This does not work because of some strange url's that are generated:

      http://ip169-093.vpro.nl:8085/vpronl-sample/?mgnlPreview=true&mgnlChannel=desktop&mgnlChannel=desktop&mgnlPreview=true#navigation-overlay&mgnlChannel=desktop&mgnlPreview=true
      

      It looks like the code in info.magnolia.ui.vaadin.gwt.client.connector.PageEditorConnector basically adds the parameters to the path:

              eventBus.addHandler(FrameNavigationEvent.TYPE, new FrameNavigationEventHandler() {
                  @Override
                  public void onFrameUrlChanged(FrameNavigationEvent frameUrlChangedEvent) {
                      String path = frameUrlChangedEvent.getPath();
      
                      final String platformId = getState().parameters.getPlatformType().getId();
                      path += path.indexOf('?') == -1 ? "?" : "&";
                      path += "mgnlChannel=" + platformId;
      
                      final boolean isPreview = getState().parameters.isPreview();
                      path += "&mgnlPreview=" + isPreview;
      
                      view.setUrl(path);
                  }
              });
      

      This does not allow for url fragment identifiers.

        Acceptance criteria

              mdivilek Milan Divilek
              breun Nils Breunese
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD