Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-568

ContentQuery limited to a part of the sitemap

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • 2.9.9
    • 2.9.3
    • Storage
    • None

      When working with the repository query API, it's not possible at this time (or very bothersome) to query a list of contents matching some criteria and limiting the query to a subtree of the sitemap (for example retrieve all the contents which are referenced by any page under a certain section).
      It would be interesting to have the possibility to do that, for instance with a subclass of ContentQuery with a 'page' or 'path' parameter on the execute method.

          [CMS-568] ContentQuery limited to a part of the sitemap

          Commited all the ContentOnPageQuery API & implementation.

          Nicolas Gavalda (Inactive) added a comment - Commited all the ContentOnPageQuery API & implementation.

          This is more a new feature than an improvement...

          Nicolas Gavalda (Inactive) added a comment - This is more a new feature than an improvement...

          Cedric proposed to create a new content query type called "ContentOnPageQuery" started implementing it, and I made some modifications.
          The implementation seems to work here for me (without testing with composite metadata, though).

          Here is a proposition of implementation. Most of it is from Cedric (with a bit of refactoring), based on the existing ContentQuery and ContentPage API/JCR implementation. The code certainly needs some review, as I'm not very familiar to JCR XPath-query syntax.

          Nicolas Gavalda (Inactive) added a comment - Cedric proposed to create a new content query type called "ContentOnPageQuery" started implementing it, and I made some modifications. The implementation seems to work here for me (without testing with composite metadata, though). Here is a proposition of implementation. Most of it is from Cedric (with a bit of refactoring), based on the existing ContentQuery and ContentPage API/JCR implementation. The code certainly needs some review, as I'm not very familiar to JCR XPath-query syntax.

            Unassigned Unassigned
            ngavalda Nicolas Gavalda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: