Access PageProperties from a Component + Sightly

Avatar

Avatar

patK-ze1xYs

Avatar

patK-ze1xYs

patK-ze1xYs

15-10-2015

[Thread Edited By Adobe]

/*Don’t forget to meet and greet your fellow peers virtually by telling them about yourself here

Go ahead and to it now: https://adobe.ly/3eDnB4v */

 

Actual Question:

In JSP I have used (currentPage.getContentResource()).getResourceType() to access resourcetype of a template from a component.

In sightly I wondered if we can access the same using ${pageProperties}

I am trying following from the component.html , and I get empty String Values

${pageProperties.cq:designPath} <br/>

${pageProperties.jcr:title} <br/>

${pageProperties.sling:resourceType} <br/>

How can I do this in Sightly  ?   

desktop_exl_promo_600x100_gdrp.png

View Entire Topic

Avatar

Avatar

ebin_Aby

Avatar

ebin_Aby

ebin_Aby

24-07-2017

Any way we can do it in 6.1 . Was trying by  HTL Block Statements

<div data-sly-use.product=“/etc/commerce/product/12345”>

  ${ product.title }

</div>