Expand my Community achievements bar.

Introducing Adobe LLM Optimizer: Own your brand’s presence in AI-Powered search and discovery

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

How to author/select AEM pages in component dialog?

Avatar

Level 9

I am building a custom component which will be used to list down few other pages. Basically I want to get the list pages(multi field) from author and show them in the page for which I need to know what resource type I should I use in component dialog. 

 

I read all OOTB dialogs (https://developer.adobe.com/experience-manager/reference-materials/6-4/granite-ui/api/jcr_root/libs/...), text, image, video, rte but I could not find any xtype/ resource type that is related to select any page.

 

Is there any easy way to get the page path from component dialog ?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Hi @Mario248 ,

Please refer below button component for we-retail for similar page selection requirement

/apps/weretail/components/content/button/cq:dialog/content/items/column/items/linkTo

Screen Shot 2022-06-13 at 2.09.37 PM.png

To answer your question - here is the resourceType can be used for the same 

granite/ui/components/coral/foundation/form/pathfield

which has additional properties rootPath - which is source data root path. Absolute or relative path for the root folder for the source data.

Hope that helps!

Regards,

Santosh


Santosh Sai

AEM BlogsLinkedIn


View solution in original post

3 Replies

Avatar

Community Advisor

Use sling:resourceType as /libs/granite/ui/components/coral/foundation/form/pathfield

Himanshu Jain

Avatar

Community Advisor

Hi @Mario248 

 

What you need is a pathBrowser. You can refer the below.

 

<pageList
    jcr:primaryType="nt:unstructured"
    sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
    fieldLabel="Logo Path"
    name="./logoPath"
    required="true"
    rootPath="/content/abc"/>

 

Avatar

Correct answer by
Community Advisor

@Hi @Mario248 ,

Please refer below button component for we-retail for similar page selection requirement

/apps/weretail/components/content/button/cq:dialog/content/items/column/items/linkTo

Screen Shot 2022-06-13 at 2.09.37 PM.png

To answer your question - here is the resourceType can be used for the same 

granite/ui/components/coral/foundation/form/pathfield

which has additional properties rootPath - which is source data root path. Absolute or relative path for the root folder for the source data.

Hope that helps!

Regards,

Santosh


Santosh Sai

AEM BlogsLinkedIn