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

Tool that creates query field definitions based on Query Controller configuration

    XMLWordPrintable

Details

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 2.5.7
    • None

    Description

      Add a tool that, based on content view configuration, creates the matching field definitions.

      Example

      Query controller view configuration

      gallery:
          controller: ez_query:locationQueryAction
          template: full/gallery.html.twig
          match:
              Identifier\ContentType: gallery
          params:
              query:
                  query_type: LocationChildren
                  parameters:
                      parentLocationId: '@=location.id'
                      contentTypeIdentifier: 'gallery'
                  assign_results_to: images
      

      Query field definition

      • Content type: gallery (matcher Identifier\ContentType)
      • Field def dentifier: images (assign_results_to)
      • Query type: LocationChildren (query_type)
      • Query type parameters: the contents of the parameters key.

      The view configuration for the field can also be proposed:

      content_query:
        gallery_images:
          match:
            Identifier\ContentType: gallery
            Identifier\FieldDefinition: images
          template: 'content_query/gallery/images.html.twig'
      

      What's left to do is create the template, based on the processing of the images variable in the gallery.html.twig template.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bertrand.dunogier@ibexa.co Bertrand Dunogier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: