Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3101

Allowing mixed content/contentNode query results in QueryImpl

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 4.3
    • 4.3
    • None
    • None

      There may be several cases where you want to query for something that may be a content or a contentNode (page or paragraphs) and you want results of both types.

      At the moment you can only specify a single nodeType in query, so there is no way to handle a similar case. Also using the single query twice with different nodeType is not enough...

      <cms:query nodeType="mgnl:content" ..../>
      <cms:query nodeType="mgnl:contentNode" ..../>

      ... since the first query will also returns pages containing paragraphs that matches the xpath expression (QueryImpl iterates on parents till it founds the requested nodetype)... you will have to create two different queries with the nodetype used also for the xpath condition. After that, you may need to merge and sort the results.

      With a trivial change in QueryImpl we may allow specifying more than one node type, so that users can simply do:

      <cms:query nodeType="mgnl:content mgnl:contentNode" ..../>

        Acceptance criteria

              fgiust Fabrizio Giustina
              fgiust Fabrizio Giustina
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD