Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow custom login themes to define a footer ftl fragment #31390

@thomasdarimont

Description

@thomasdarimont

Description

It should be easy to add a custom footer to custom login themes without having to override the template.ftl.

Discussion

No response

Motivation

It is a common requirement for custom themes to show a list of links at the footer of the login pages.
Currently users need to replace the whole template.ftl file just to add a custom footer fragment.
This leads to more complex themes and causes additional maintenance effort on upgrades.

Details

It should be possible to define a custom footer just by declaring a custom footer.ftl file in the theme.

With the default keycloak theme we could ship an empty footer.ftl file that is then referenced by the main template.ftl like this:

<#import "footer.ftl" as footer>
...

<@footer.content/>

The "empty" default footer.ftl could look like this:

<#-- override this file in your custom theme to declare a custom footer element -->

The following is an example for a potential custom footer.ftl file:

<#macro content>
    <footer>
        <ul class="footer-links">
            <li><a href="https://apps.training.test/apps/site/home">Home</a></li>
            <li><a href="https://apps.training.test/apps/site/about">About</a></li>
            <li><a href="https://apps.training.test/apps/site/services">Services</a></li>
            <li><a href="https://apps.training.test/apps/site/contact">Contact</a></li>
        </ul>
    </footer>
</#macro>

This could be added to the base and keycloak.v2 theme.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions