Expand my Community achievements bar.

SOLVED

how to add additional title to the existing template

Avatar

Level 1

Hi, 

Can  some help me to how to create a  ,Auto-populate Page Title for under the somepages) example ..  Example ("Title" | sometext).  

post with some sample too, I have created a new title component and trying to referring the page , it not working as expected.

 

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @gavya ,

 

Try to get that title dynamically using any page model and call it in clientheaderlibs.html file of your template referring page component. It does work. sample code snippet below:

<sly data-sly-use.pageModel="com.aem.community.core.models.PageModel"></sly>
<title>${pageModel.title} | sometext</title>

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @gavya ,

 

Try to get that title dynamically using any page model and call it in clientheaderlibs.html file of your template referring page component. It does work. sample code snippet below:

<sly data-sly-use.pageModel="com.aem.community.core.models.PageModel"></sly>
<title>${pageModel.title} | sometext</title>