After running query output is not coming

Avatar

Avatar
Validate 10
Level 3
sunitac2231600
Level 3

Likes

4 likes

Total Posts

90 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
sunitac2231600
Level 3

Likes

4 likes

Total Posts

90 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
sunitac2231600
Level 3

14-04-2016

Dear Team,

I am following below document to run my query.

https://docs.adobe.com/docs/en/cq/5-6-1/dam/customizing_and_extendingcq5dam/query_builder. html

When I want to look into the last modify pages change , by using below query

Find all pages and order them by last modified

     
1

2

type=cq:Page
orderby=@jcr:content/cq:lastModified

 

 

Then I am getting below error.

 

java.text.ParseException: Query: type=(*)cq:Page orderby=@jcr:content/cq:lastModified; expected:

 

I have attached the screenshot of error also.

 

Replies

Avatar

Avatar
Validate 10
Level 3
CQ_learner
Level 3

Likes

6 likes

Total Posts

53 posts

Correct reply

5 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
CQ_learner
Level 3

Likes

6 likes

Total Posts

53 posts

Correct reply

5 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
CQ_learner
Level 3

14-04-2016

Hi,

For XPath Query in crx you can use the following syntax to get the pages ordered by cq:lastmodified.

/jcr:root/content//element(*, cq:Page)
order by cq:lastModified

Please refer the following documentation for more info.

https://docs.adobe.com/docs/en/cq/5-6-1/dam/customizing_and_extendingcq5dam/query_builder.html

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

19-04-2016

Hi 

Please use following query:-

/jcr:root/content/geometrixx/en//element(*, cq:Page)
order by jcr:content/@cq:lastModified

I would suggest you to use this tool:-

Link:- http://localhost:4502/libs/cq/search/content/querydebug.html

 

Top Reference article to read:- http://aemcq5.blogspot.in/2014/11/cq5-querybuilder-simplified.html

 

I hope this would help you.

Thanks and Regards

Kautuk Sahni