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

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

    XMLWordPrintable

    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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              bertrand.dunogier@ez.no Bertrand Dunogier
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: