Adding a custom footer to aem/start.html | Community
Skip to main content
debasis-swain
New Participant
April 29, 2019
Solved

Adding a custom footer to aem/start.html

  • April 29, 2019
  • 2 replies
  • 2362 views

Hi Team,

I have a requirement where I need to add a custom footer to the aem/start.html page.

I saw the below code in "/libs/granite/ui/components/shell/page/page.jsp " where there is a globalfooter being referred to but I do not see one in the start up page.

Resource globalFooter = resourceResolver.getResource("/mnt/overlay/granite/ui/content/globalfooter");

if (globalFooter != null) {%>

  

    <%for (Iterator<Resource> it = globalFooter.listChildren(); it.hasNext();) {

        %><div> Footer Inside Loop Here</div><sling:include resource="<%= it.next() %>" /><%

    }

}

Can somebody help to add a custom footer to the aem landing page ("aem/start.html")

Thanks,

Debasis

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 arunpatidar

Hi,

That global footer is used to render satelite scripts(JS script for analytics)

/libs/cq/experiencelog/components/footer/footer.jsp

You can simply overide page.jsp and add one more block for footer

e.g.

<coral-shell-content class="foundation-content-footer">

        Footer

    </coral-shell-content>

    </coral-shell>

<%

Resource globalFooter = resourceResolver.getResource("/mnt/overlay/granite/ui/content/globalfooter");

if (globalFooter != null) {

    for (Iterator<Resource> it = globalFooter.listChildren(); it.hasNext();) {

        %><sling:include resource="<%= it.next() %>" /><%

    }

}

%>

.foundation-content-footer{

  1. display:flex;
  2.    padding: 20px;
  3.    background-color:red }

2 replies

debasis-swain
New Participant
April 30, 2019

Thanks Arun. I was able to add the footer to the aem landing page based on your approach.

arunpatidar
arunpatidarAccepted solution
New Participant
April 29, 2019

Hi,

That global footer is used to render satelite scripts(JS script for analytics)

/libs/cq/experiencelog/components/footer/footer.jsp

You can simply overide page.jsp and add one more block for footer

e.g.

<coral-shell-content class="foundation-content-footer">

        Footer

    </coral-shell-content>

    </coral-shell>

<%

Resource globalFooter = resourceResolver.getResource("/mnt/overlay/granite/ui/content/globalfooter");

if (globalFooter != null) {

    for (Iterator<Resource> it = globalFooter.listChildren(); it.hasNext();) {

        %><sling:include resource="<%= it.next() %>" /><%

    }

}

%>

.foundation-content-footer{

  1. display:flex;
  2.    padding: 20px;
  3.    background-color:red }
Arun Patidar