Uploaded image for project: 'Magnolia Frontend Helpers'
  1. Magnolia Frontend Helpers
  2. MGNLFE-17

SPA can tell if it is running in Pages App, in Preview, or in Production

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • None
    • None
    • None
    • None
    • Yes
    • Yes
    • SPA Editor 12, SPA Editor 13, SPA Editor 14, UI Framework & 6.2 Ramp up 15
    • 3

    Description

      User Story: As a SPA developer, I want to know if my SPA is in Pages Editor, Pages Preview or in Production, so that I can potentially hit different URL's for content or do rendering or other things conditionally.

      Notes:

      The page editor could set some globally accessible properties, for example by writing to the window object. The absence of these properties could be interpreted as being in production.

      For example:

      window.is_pages_app_editor = true;

      window.is_pages_app_preview = true;

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                sang.ngo Sang Ngo Huu
                czimmermann Christopher Zimmermann
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 2.25d
                      2.25d