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

[Norsu] @path value in routeTemplate should not include workspace

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.3.0
    • None
    • None
    • None

      As a developer, when using Pages app on SaaS I want the iframe to load urls that do not include the workspace, so that I can use the path directly in my SPA as I am used to. This means SPA will not need to be adjusted to work on SaaS.

      We have decided to keep the JCR "workspace" name and concept on SaaS for consistancy. Implementation of Decision.

      When a developer configures a page template, they configure which URL should be loaded in the iframe for the currently selected page. A typical configuration looks like this:

      title: 'React: Basic 2'
      baseUrl: http://localhost:3000
      routeTemplate: '{{@path}}'

      The IFRAME then loads the url of the `baseUrl` plus the resolved `routeTemplate`.

      Expected:

      The @path parameter returns the path of the currenly selected page, without the workspace. ie, no "website" at the front.

      Actual:

      The @path parameter returns the full Norsu path, which includes the workspace at the front of the path. In this case "website". 

      Acceptance criteria:

      • Do not hardcode the solution with the name "website", it should remove whatever the first path segment is. Because in the future, pages app can edit content in other workspaces as well.
      • This should also apply when using the site templatePrototype to supply the routeTemplate.

       

      Example of the issue this is causing - porting trial customer:

      https://magnolia-cms.slack.com/archives/C0270PGSB1B/p1669375138388419

       

        Acceptance criteria

              rsiska Robert Šiška
              czimmermann Christopher Zimmermann
              DeveloperX
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Work Started:

                  Task DoR

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 7h
                    7h