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

          Cédric Damioli made changes -
          Workflow Original: jira [ 11777 ] New: Ametys [ 13820 ]
          Julien Couret (Inactive) made changes -
          Project Import New: Thu May 28 17:09:53 UTC 2009 [ 1243530593866 ]
          Cédric Damioli made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Nicolas Gavalda (Inactive) made changes -
          Fix Version/s New: 2.9.9 [ 11482 ]
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Commited all the ContentOnPageQuery API & implementation.

          Nicolas Gavalda (Inactive) added a comment - Commited all the ContentOnPageQuery API & implementation.
          Nicolas Gavalda (Inactive) made changes -
          Issue Type Original: Improvement [ 4 ] New: New Feature [ 2 ]

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

          Nicolas Gavalda (Inactive) added a comment - This is more a new feature than an improvement...
          Nicolas Gavalda (Inactive) made changes -
          Attachment New: ContentOnPageQuery.diff [ 14295 ]

          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.
          Nicolas Gavalda (Inactive) created issue -

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

              Created:
              Updated:
              Resolved: