Is there any inbuilt AEM function to get site name in template. | Community
Skip to main content
Level 3
November 14, 2018
Solved

Is there any inbuilt AEM function to get site name in template.

  • November 14, 2018
  • 2 replies
  • 903 views

There are multiple sites in AEM. I want to switch header depending on site. Is there any in built AEM function to get site name in template.

I know I can do it by creating helper but I am looking for AEM built in function to get site name.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

If you more requirements where templates are shared between sites, but you also have site-specific text or configurations, you might want to explore Context Aware Configs https://experienceleague.adobe.com/en/docs/experience-manager-core-components/using/developing/context-aware-configs 

2 replies

arunpatidar
Community Advisor
Community Advisor
November 14, 2018

Hi,

I think there is no function to directly get you the site name or path but you can get hierarchy level of the parent page by using

Page ("The Adobe AEM Quickstart and Web Application.")

Arun Patidar
aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
April 24, 2024

If you more requirements where templates are shared between sites, but you also have site-specific text or configurations, you might want to explore Context Aware Configs https://experienceleague.adobe.com/en/docs/experience-manager-core-components/using/developing/context-aware-configs 

Aanchal Sikka