XF 2.1 Insert new link in the footer


Hi guys, I should insert a new link (which contains html code once opened) in the footer. Taking this forum as an example, link to be inserted in the footer after "Terms and rules" "Privacy and rules" "help" and "Home". How can I do? Thanks!
The code to use is this, right?

In the page that opens by clicking on the link, I have to insert a script. How can I do?


<xf:if is="$xf.tosUrl">
<li><a href="{$xf.tosUrl}">{{ phrase('NAMELINK') }}</a></li>
Just found this thread and was able to add a link to the footer link list. Here is the code for the whole <div> section that contains the links:

<div class="p-footer-row-opposite">
                <ul class="p-footer-linkList">
                    <xf:if is="$xf.visitor.canUseContactForm()">
                        <xf:if is="$xf.contactUrl">
                            <li><a href="{$xf.contactUrl}" data-xf-click="{{ ($xf.options.contactUrl.overlay OR $xf.options.contactUrl.type == 'default') ? 'overlay' : '' }}">{{ phrase('contact_us') }}</a></li>
                    <li><a href="/xf/threads/rising-sun-mailing-address.32796/">Club Mailing Address</a></li>
                    <xf:if is="$xf.tosUrl">
                        <li><a href="{$xf.tosUrl}">{{ phrase('terms_and_rules') }}</a></li>

                    <xf:if is="$xf.privacyPolicyUrl">
                        <li><a href="{$xf.privacyPolicyUrl}">{{ phrase('privacy_policy') }}</a></li>

                    <xf:if is="$xf.helpPageCount">
                        <li><a href="{{ link('help') }}">{{ phrase('help') }}</a></li>

                    <xf:if is="$xf.homePageUrl">
                        <li><a href="{$xf.homePageUrl}">{{ phrase('home') }}</a></li>

                    <li><a href="{{ link('forums/index.rss', '-') }}" target="_blank" class="p-footer-rssLink" title="{{ phrase('rss')|for_attr }}"><span aria-hidden="true"><xf:fa icon="fa-rss" /><span class="u-srOnly">{{ phrase('rss') }}</span></span></a></li>

The specific section you need to edit starts with <ul class="p-footer-linkList"> which is an unordered list. If you look at the code above, I have added a new list item <li> that is second in the list. My new code is <li><a href="/xf/threads/rising-sun-mailing-address.32796/">Club Mailing Address</a></li>.

This started at line 598 in our PAGE_CONTAINER template.

Hope this is helpful.
Last edited:
Top Bottom