Apply sorted tree nodes to siteadmin 'redirect' pathfield | Community
Skip to main content
Level 3
October 16, 2015
Solved

Apply sorted tree nodes to siteadmin 'redirect' pathfield

  • October 16, 2015
  • 14 replies
  • 3224 views

Our customer wants to be able to see tree nodes in alphanumeric order in the pathfield dialog from the 'redirect' field on the siteadmin page properties dialog. I found an article here - http://experience-aem.blogspot.com/2014/04/aem-cq-56-sort-tree-nodes-of-browse-dialog-pathfield.html - that shows what appears to be a pretty simple solution to what our customer wants. I've been struggling with this for a couple of days but can't seem to find the right solution to add the listener described in the article to the built-in siteadmin page. I tried copying /libs/foundation/component/page component to /apps/foundation/component/page and applying the listener and additional javascript there but that didn't work.

What is the best way to accomplish what I need?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by edubey

While creating template is AEM we usually inherit the functionality from OOTB page component on top of which we add our own files.

So in all at the end /libs/foundation/components/page will be rendering. Now here is the point, have you override dialog of OOTB page component.

Can you see dialog at /apps/history/pages/page path ?

Here is great article by Adobe : https://docs.adobe.com/docs/en/cq/5-6-1/howto/website.html

14 replies

Level 3
October 16, 2015

Here's the structure of the page:

/apps/history/templates/redirectpage has sling:resourceType of /apps/history/pages/redirectpage

/apps/history/pages/redirectpage has sling:resourceSuperType of /apps/history/pages/page

/apps/history/pages/page has sling:resourceSuperType of foundation/components/page

I've created a couple of new pages using this template and it still seems that the page is being rendered by /libs/foundation/components/page. I even set the sling:superResourceType in /apps/history/pages/page to /apps/foundation/components/page and it still does not seem to be using the apps version to render the page.

Level 3
October 16, 2015

It appears that my page component is not being rendered. I changed the label on the redirect field to 'RedirectMe' but that's not what I see when I open the properties dialog. I'm still seeing 'Redirect'. So I guess the question is: why is the system not seeing my version of the component?

 

Thanks for the help!

edubey
edubeyAccepted solution
Level 10
October 16, 2015

While creating template is AEM we usually inherit the functionality from OOTB page component on top of which we add our own files.

So in all at the end /libs/foundation/components/page will be rendering. Now here is the point, have you override dialog of OOTB page component.

Can you see dialog at /apps/history/pages/page path ?

Here is great article by Adobe : https://docs.adobe.com/docs/en/cq/5-6-1/howto/website.html

Level 3
October 16, 2015

The problem was that the dialog was already in our /apps/history/pages/page directory. I just hadn't realized that there were already customizations that had been made. Thanks for the help!