Expand my Community achievements bar.

SOLVED

Dialog property retrieval on page via sightly

Avatar

Level 9

Hi All.

Doubt as below :

In component.html, we have a section as below :

<div class="col-xs-12 col-md-6" data-sly-test="${currentPage.title}">

<a href="something.pdf" class="icon-link doc_link_more"><span data-fi-lb>View  ${currentPage.title}</span></a>

  </div>

1] Here if I try with the above, it works fine and getting me the page title value.

2] However, if I try with another custom property at the page jcr:content level[i.e, at sme level where title is present] and of type "String" only, it is not displaying anything. 

3] Also, there are couple of dialog properties[of type "String"] that I have to retrieve, which is also not coming up on the page.

Any thoughts/pointers on this will be really helpul.

1 Accepted Solution

Avatar

Correct answer by
Level 10

THis is how you work with dialog values in Sightly: 

<div id="moviedata">
                                <p><span>Movie : ${properties.movieName} <span> </p>
                                <p>Release Date : ${properties.releaseDate} </p>
                                <p>Director : ${properties.directors} </p>
                                <p>Length : ${properties.movieLength}</p>
                                <p>Production House : ${properties.productionHouse}</p>
                                <p>Language : ${properties.language}</p>
                                <p>Note : ${properties.note}</p>
                            </div>

This is code that is coming out on this Article: http://scottsdigitalcommunity.blogspot.ca/2016/02/creating-aem-sightly-movie-component.html

Hope this helps... 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

THis is how you work with dialog values in Sightly: 

<div id="moviedata">
                                <p><span>Movie : ${properties.movieName} <span> </p>
                                <p>Release Date : ${properties.releaseDate} </p>
                                <p>Director : ${properties.directors} </p>
                                <p>Length : ${properties.movieLength}</p>
                                <p>Production House : ${properties.productionHouse}</p>
                                <p>Language : ${properties.language}</p>
                                <p>Note : ${properties.note}</p>
                            </div>

This is code that is coming out on this Article: http://scottsdigitalcommunity.blogspot.ca/2016/02/creating-aem-sightly-movie-component.html

Hope this helps...