## Get Subtitle Page Property with HTL

JonMaguire

Total Posts

19

Likes

0

0

JonMaguire

Total Posts

19

Likes

0

0
JonMaguire

09-09-2020

I'm wanting to retrieve the page subtitle and description using HTL. Using the AEM HTL Read–Eval–Print Loop environment to test, I'm able to get the description using \${item.description} but cannot get subtitle using the same format, \${item.subtitle}. Is there a different way to get the subtitle property?

View Entire Topic

MVP

Total Posts

112

Likes

204

43

MVP

Total Posts

112

Likes

204

43
MVP

09-09-2020

Hi @JonMaguire ,

If your page has title and subtitle as shown below, it can be retrieved as:

<ul data-sly-list="\${currentPage.listChildren}">
<li>\${item.title}</li>
<li>\${item.properties.subtitle}</li>
</ul>