Search code examples
liferaythemesfooterliferay-theme

Footer in Liferay


I need to make a footer in Liferay and use theme for it. What's the simpliest way to do it?

I have created new theme, filled _diffs folder with other folders, but it's empty and I couldn't find relevant docs about this. Should I copy all basic files there? What should I change to create footer?


Solution

  • In Liferay, theme's portal_normal.vm serves as the template to construct HTML structure of the page. There you define your header, body and footer includes.

    When you will look at the portal_normal.vm of classic theme, you will observe following HTML snippet:

    <footer id="footer" role="contentinfo">
        <p class="powered-by">
            #language ("powered-by")
            <a href="http://www.liferay.com" rel="external">Liferay</a>
        </p>
    </footer>
    

    This is the footer of the page. This is what you need to implement. However, it's not necessary to use footer tag at all, as you can simply use div or table based structure with bootstrap or customized CSS classes for your footer, it's upto your requirement.

    Remember! Classic theme is just like a sample provided by Liferay, so, it's not good idea to directly customize it.

    Everybody needs a whole customized view of the site, and for this the best idea is to create a custom theme (that's what you are doing!), that will give you full control over your look-n-feel.

    To kick-start, you can initially copy required folders from classic theme to your customized theme's (_diffs folder) and start changing bit by bit.