Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

How get page properties of a specific page? using template? or path=?¿?

Avatar

Level 1

Site Pages:

A

B

   ->   B2

   ->   B3

C

In B3 page i need "C" page properties, I can´t use inheretedPageProp because "C" is not a top node of B3.

Its possible get C properties  like $(... page by template of path... .title) ?¿

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 7

You should use the C page's path. First you should convert the C page's path to a resource then adapt it to Page or Node to get the jcr:title property. You can use Sightly's JavaScript Use API by passing page C's path and the required property (jcr:title).

or try below

${resolver.getResource('/path/to/page/C/jcr:content')['jcr:title']}

if the above one doesn't work,try 1st step.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 7

You should use the C page's path. First you should convert the C page's path to a resource then adapt it to Page or Node to get the jcr:title property. You can use Sightly's JavaScript Use API by passing page C's path and the required property (jcr:title).

or try below

${resolver.getResource('/path/to/page/C/jcr:content')['jcr:title']}

if the above one doesn't work,try 1st step.