How to include AEM parsys in page component

11,263

The log messages you're seeing are not related to Sightly itself, but rather the LiveCopy status of the page that's being rendered. If the parsys render output is correct it means it is properly included by the body page component.

The "@" symbol is being used by Sightly to delimit expression options; the same mechanism is being used to send parameters when invoking sightly templates or including other resources via data-sly-resource.

In other words, the parameters for the data-sly-resource inclusion need to be provided after the "@" symbol. The differences between the two examples you provided are minor: in the first statement the 'right-parsys' child resource of the current resource will be included using the 'wcm/foundation/components/parsys' resource type; the second statement will include the current resource using the 'wcm/foundation/components/parsys' resource type.

Share:
11,263
Cris Rockwell
Author by

Cris Rockwell

Developer with experience in Java, Groovy, PHP, Ruby, JS, and other languages. I've been working with AEM for several years on web applications. Before working on web content systems, I worked on developing applications for research and engineering in a broad set of projects involving multimedia, animation, simulation, motor control, electronics hardware applications, automotive systems design and manufacturing, and a few android.

Updated on June 04, 2022

Comments

  • Cris Rockwell
    Cris Rockwell about 2 years

    I have the following line, in the page component file /apps/my-app/components/pages/homepage/body.html

    <div data-sly-resource="${ @path='right-parsys',resourceType='wcm/foundation/components/parsys'}"></div>

    And we are getting log messaages

    [.... GET /content/our-system/home/en.html HTTP/1.1] com.day.cq.wcm.msm.impl.LiveRelationshipManager Impl StarResource given at /content/our-system/home/en/jcr:content/right-parsys/*: no parent: no LiveCopy

    I have the following questions: Is the paragraph system properly added to the sightly page component? It seems to work ok. This is a second paragraph drop zone in the right positioned column. I've also seen it this way data-sly-resource="${granite.resource.path @ resourceType='wcm/foundation/components/parsys'} what's the difference?

    What is meant by 'Star Resource' in the context of the logged warning? Given the sightly documentation I still don't quite get the usage of the @ symbol.