Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22735

Make {{ path( 'ez_urlalias' ) }} polymorphic

    Details

      Description

      The ez_urlalias twig function accepts a Location (Id) as its argument. This makes it difficult and tedious to preview content, since previewed content can be unpublished, and have no Location yet.

      This can be avoided by making the function more flexible. It should accept as an argument:

      • a Content OR a ContentInfo, in which case it generates the alias to the main Location, if there is one
      • a Location
      • a Location ID

      Content, ContentInfo and Location should be preferred and highlighted in dev documentation. But this makes the developer responsible for passing sane arguments, and we can handle the missing main location within the router.

        Issue Links

          Activity

          Show
          Edi Modrić (Inactive) added a comment - Possible solution: https://github.com/ezsystems/ezpublish-kernel/pull/1064
          Show
          Jérôme Vieilledent (Inactive) added a comment - Implemented in master: https://github.com/ezsystems/ezpublish-kernel/commit/1d0297369e5d86c82b94f2d2fb36482dc25e58de
          Show
          Jérôme Vieilledent (Inactive) added a comment - Updated documentation
          Hide
          Pedro Resende (Inactive) added a comment -

          Tested and approved by Q.A.

          Show
          Pedro Resende (Inactive) added a comment - Tested and approved by Q.A.

            People

            • Assignee:
              Unassigned
              Reporter:
              Bertrand Dunogier
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: