Menu

How to search and get list of all pages of a given template in AEM?

Adobe experience manager is a powerful content management tool that provides ample options to explore and manage the content. In this post, we are going to see how to search and get all the pages from AEM which are created using a given template.

The detail required to execute this process.

Project path: Path of the directory where we would want to search the pages. e.g. /content/sample/en/en_us

Template path: Path of template. e.g. /apps/sample/templates/press

Now we have prerequisite handy with us, let's move to the execution.

Step 1: Go to the below mention URL. Adjust the domain according to your domain name.

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

Step 2: Put the following query in the "Query Builder Debugger" section

type=cq:Page

path=/content/sample/en/en_us

1_property=jcr:content/cq:template

1_property.value=/apps/sample/templates/press

p.limit=500

In the above query; type cq:Page will include the nodes that have type cq:Page. Other than that nodes will get excluded from the script. after that path under that, we want to search the pages. Then after the name of the property and property value that will be a path of the template for which we are looking.

The last line p.limit is to set the limit of the results. We may set higher to get all the results at once on the screen. 

AEM Query Builder Debugger

Now click on the search button. After that query builder will execute the query and show the result on the right side of the page under the results section. Below is the screenshot.

 

Now click on the JSON QueryBuilder Link and get the JSON of the result which later you can convert into a CSV/XLS for future references.


Hope this helps you!, do let us know in the comment section if you have any question or suggestion.

References:

https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/query-builder/querybuilder-api.html?lang=en#refining-what-is-returned


India as an 'Electoral Autocracy'

A Swedish research institute the V Dem Institute has said that India is no more "Electoral Democracy", but now India is an "Electoral Autocracy" this is all because of the decline in democratic freedoms to the people of India. The researchers of V Dem Institute said:

"Electoral autocracies continue to be the most common regime type. A major change is that India – formerly the world’s largest democracy with 1.37 billion inhabitants – turned into an electoral autocracy. With this, electoral and closed autocracies are home to 68% of the world’s population. Liberal democracies diminished from 41 countries in 2010 to 32 in 2020, with a population share of only 14%. Electoral democracies account for 60 nations and the remaining 19% of the population."


The full report can be accessed via the link: "Democracy Report 2021" or https://www.v-dem.net/files/25/DR%202021.pdf

Democracy is broken in India, Democracy Report 2021 

References:

India, Bias Against Muslims and Minorities


Discriminatory Laws and Policies



Bias investigation





Bias Justice System

In many states, the criminal justice system increasingly reflects the discriminatory views of the BJP, targeting religious and other minorities and critics of the government, and shielding its supporters. Source HRW
The biggest injustice done by the Supreme court of India when Supreme court declared Babri Masjid land to Hindus to build a temple and released all the accused who were directly or indirectly responsible to demolish the Babri Masjid in Ayodhya.

Empowering Vigilantes

Many Muslims were lynched by Hindu mobs or goons in presence of police. And in almost cases judiciary failed to deliver justice to victim families, and granted bail to accused.


Hate Crime Against Minorities



Fueling Islamophobia



Claiming 'Hurt Religious Sentiments'


References

1. https://www.hrw.org/news/2021/02/19/india-government-policies-actions-target-minorities