From BC$ MobileTV Wiki
Jump to: navigation, search

Speaking of logs, need to setup the expiration policy and Backups for the Logs.

  • Author logs: /home/aemadmin/author/crx-quickstart/logs/
  • Publisher logs: /home/aemadmin/publish/crx-quickstart/logs/
  • Dispatcher logs: /home/aemadmin/dispatcher/crx-quickstart/logs/

curl -X POST --data "q=test" http://localhost:4502/services/SearchServlet --header "Content-Type:application/json"

Query to find which AEM Sites - Pages and/or AEM DAM - Assets have

SELECT page.* FROM [cq:Page] AS page INNER JOIN [cq:PageContent] AS jcrcontent ON ISCHILDNODE(jcrcontent, page) WHERE ISDESCENDANTNODE(page, "/content/alc/en") AND jcrcontent.[cq:lastModified] >= CAST("2021-02-25T00:00:00.000Z" AS DATE)

Pass parameters to an HTL Sightly backend Java model:

<sly data-sly-use.myThing="${'com.adobe.aem.guides.wknd.core.models.ContentFragmentLookupList' @ cfmPath=properties.cfmPath, cqTags=properties.cqTags}" />

Then on the HTL front-end you'll have access to:


Which maps to backend Java:

public String getData() {
   return data;

Trick for Sling Resource Merger on just "Page Properties"

Is there a specific trick that needs to be used to do Sling resource merger with page properties? I'm trying to add a new fieldset to the advanced tab and my page component's super resource type is the core page v2. I've tried creating the shell of the advanced tab and also tried it like the slug and fields were added in the basic tab in the page dialog of the v2 page. Neither way displays my new fields. I can see the dialog fields in the JCR under my page component's dialog.

There is a trick, and that is to notice when the thing you are overriding is actually an include resource type. The Core Page v2 resourceType extends wcm/foundation/components/basicpage/v1/basicpage , and it inherits the advanced dialog tab from the super type because it does not override it. /libs/wcm/foundation/components/basicpage/v1/basicpage/cq:dialog/content/items/tabs/items/advanced defines the tab as a granite/ui/components/coral/foundation/include of /mnt/overlay/wcm/foundation/components/basicpage/v1/basicpage/tabs/advanced, which means that for you to customize the tab, you must either:

1.) set the sling:resourceType property of your advanced tab element to something like granite/ui/components/coral/foundation/container (which would break all inheritance from the super type) -OR- 2.) relocate your <advanced … >...</advanced>element to its own docview xml file located in an overlay path of /apps/wcm/foundation/components/basicpage/v1/basicpage/tabs/advanced.xml

StyleSystem porgrammatic access

Accessing "StyleSystem" selections from backend Component code in AEM.

private Design resourceDesign;

Then call it like this:

currentStyle = resourceDesign.getStyle(request.getResource());