Search code examples
aemsightly

Get parsys name with sightly (cq5 & aem)


Is there a way to get the parsys name when a component is added to the page?

I have two parsys on the page (name it header / footer) if I drop the same component I would like different functionality dependent on where it was dropped. All I need to know if that information is available to the children components.

I am looking for some docs if there are available.


Solution

  • What can help you is the path of your dropped element, if you named the header parsys header your child will be dropped under /content/somewebsitetree/somePage/jcr:content/header

    If it's footer it will be /content/somewebsitetree/somePage/jcr:content/footer

    Hope this helps a bit....