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

Implement a Twig helper to retrieve a Content from a Location object

    Details

      Description

      When working with a list of location objects (i.e. in sub-requests), it can be tedious to have separate arrays of Location and Content to handle.

      One solution would be to have a twig helper allowing to get the Content from the ContentInfo object (contained in Location):

      {% set myContent = ez_content_by_contentinfo( location.contentInfo ) %}
      

        Activity

        Show
        Sébastien Morel added a comment - https://github.com/ezsystems/ezpublish-kernel/pull/428

          People

          • Assignee:
            Unassigned
            Reporter:
            Jérôme Vieilledent (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

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