Expand my Community achievements bar.

SOLVED

Adding a custom footer to aem/start.html

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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() %>" /><%

    }

}

%>

Screenshot 2019-04-29 at 4.29.57 PM.png

.foundation-content-footer{

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


Arun Patidar

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

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() %>" /><%

    }

}

%>

Screenshot 2019-04-29 at 4.29.57 PM.png

.foundation-content-footer{

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


Arun Patidar

Avatar

Level 3

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