Expand my Community achievements bar.

SOLVED

could not find the JSP or js which renders: http://localhost:4502/sites.html/content

Avatar

Level 1

I an unable to find the JSP or the JS file which renders the sites.html page. I need to redirect to this page with a click of a button and perform certain actions on sites.html page when coming via that button click. If anyone knows this, kindly reply asap

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello Monu,

Yes, from the resource you can get to the jcr:content node(/libs/wcm/core/content/sites/jcr:content) you can find out sling:resourceType = granite/ui/components/foundation/page that generates this page:

Inside the

/libs/granite/ui/components/foundation/page

You may find out that

/page.jsp actually generates the page, This is the jsp you are probably willing to overlay.

But, overlaying foundation with custom logic will bring troubles later down the line when the time for the upgrade kicks in.

Thanks,

Peter

View solution in original post

4 Replies

Avatar

Community Advisor

Hey Monu,

JcrNodeResource, type=cq:Page, superType=null, path=/libs/wcm/core/content/sites

You can check it yourself from: http://localhost:4502/system/console/jcrresolver?msg=JcrNodeResource%2C+type%3Dcq%3APage%2C+superTyp...

Thanks,

Peter

Avatar

Level 1

PuzanovsP wrote...

Hey Monu,

JcrNodeResource, type=cq:Page, superType=null, path=/libs/wcm/core/content/sites

You can check it yourself from: http://localhost:4502/system/console/jcrresolver?msg=JcrNodeResource%2C+type%3Dcq%3APage%2C+superTyp...

Thanks,

Peter

 

Thanks Peter for this information. But I needed the jsp file which renders this page or pages continuing it. You have provided with the node structure of it.

Avatar

Level 10

Hi, 

You can easily write your code in /etc/clientlibs/granite/utils.js

(function() {p = window.location.pathname; if(p.startsWith("/sites.html")) doSomething(); })();

Avatar

Correct answer by
Community Advisor

Hello Monu,

Yes, from the resource you can get to the jcr:content node(/libs/wcm/core/content/sites/jcr:content) you can find out sling:resourceType = granite/ui/components/foundation/page that generates this page:

Inside the

/libs/granite/ui/components/foundation/page

You may find out that

/page.jsp actually generates the page, This is the jsp you are probably willing to overlay.

But, overlaying foundation with custom logic will bring troubles later down the line when the time for the upgrade kicks in.

Thanks,

Peter