Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to author/select AEM pages in component dialog?

Avatar

Level 3

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

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

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

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

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

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