is there a way to use an XPath or SQL Query to find out which
webproject is using which CQ5 component?
We have the following content structure:
/content/webproject [.... a lot of ]
I would like to Know which components are used which webproject.
/apps/[project]/components/[component-name] is used in webproject1, webproject2, webprojectX ..
Many thanks in advance
Yes, you can. You can use either XPath or SQL in to invoke the CQ Query Builder API to search for specific resource type. The "unique" identifier for a component type will be the sling:resourceType ([project]/components/[component-name]). Notice, no "apps" or "libs". If you use QB to search your content tree for instances of a resource type, you should be able to accomplish what you want.
There's pretty good documentation on the CQ Query Builder, which is just a more friendly wrapper around the JCR Querying API, and here's a good presentation from Alexander Klimetschek about it too:
Hope this helps!
thank you for your response and assistance.
2_property.value=[Path to component]
do the Trick !!