Jump to content
View in the app

A better way to browse. Learn more.

Learn more

How to Add Additional Item in Mobile Footer

You are viewing a curated collection of the most significant posts in this topic with an estimated read time of 7 minutes. The full topic contains 41 posts with an estimated read time of 27 minutes.

Featured Replies

v5 Cloud

Hi all,

I wish to add an item to the mobile footer (not the 'Menu' option contained within), to be located between 'Search' and 'Menu'. I thought the Menu Manager would let me do this, but of course it does not (I can only add items within 'Menu', not the level up from there). Can anyone clue me in to how I would achieve this given that there is no longer access to templates? Please keep in mind that I am not a coder.

Thanks.

I actually read you post wrong, tought you wanted to add more to the footer itself, not the mobile navigation footer. So deleted that post.

I did a small test for the mobile navigation footer:
chrome_jARbsyLbjZ.png


Then in your custom CSS:

.ipsMobileFooter {  /* your new mobile footer */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}
.ipsMobileFooter:nth-of-type(2) {  /* hide to orginal mobile footer*/
  display: none;
}
.ipsLayout__app {
  margin-bottom: 55px;  /* make sure bottom layout not hidden behind new mobile footer */
}

Note that because of the hook, that you have 2 footers .ipsMobileFooter, so you need to hide one with CSS.

Then ofcouse my emtpy Content from first picture, shows an empty bar on mobile:
image.png

You can use the "View template" and copy over the current items. And then add somewhere in that template your extra button.
Ofcouse you have to restyle the CSS buttons also, as now there is no space for an addtional button.

Edited by Moestuin

I am getting somewhere now:

Got a Test inside it:
image.png

Was not needed to restyle the CSS buttons.

Just find , and copy this part before it, and adjust this to a new button.

<li data-el="more" class="ipsMobileFooter__item">

<button class="ipsMobileFooter__link" aria-controls='ipsOffCanvas--navigation' aria-expanded='false' data-ipscontrols>

<span class="ipsMobileFooter__icon">

<svg xmlns="http://www.w3.org/2000/svg" height="16" width="14" viewBox="0 0 448 512"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>

</span>

{{$notificationCount= \IPS\Member\UserMenu::mobileNotificationCount();}}

{{if $notificationCount}}

<span class='ipsNotification'>{$notificationCount}</span>

{{endif}}

<span class="ipsMobileFooter__text">{lang="mobile_footer_menu"}</span>

</button>

</li>

Edited that part for myself:

Change for example, http://www.test.com to the link on you website where you want to go.
And change WIKI to something else.

Now only need to find a good icon for it.


<li data-el="more" class="ipsMobileFooter__item">

<a href="http://www.test.com" class="ipsMobileFooter__link" aria-controls='ipsOffCanvas--navigation' aria-expanded='false' data-ipscontrols">

<span class="ipsMobileFooter__icon">

<svg xmlns="http://www.w3.org/2000/svg" height="16" width="14" viewBox="0 0 448 512">

<path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/>

</svg>

</span>

<span class="ipsMobileFooter__text">Wiki</span>

</a>

</li>

Correction to css:

.ipsMobileFooter {
  position: fixed;       /* Fixes the footer relative to the viewport */
  bottom: 0;             /* Positions it at the bottom of the screen */
  left: 0;               /* Aligns it to the left edge */
  width: 100%;           /* Makes it span the full width */
  z-index: 9999;         /* Ensures it stays on top of other elements */
}
.ipsMobileFooter:nth-of-type(2) {
  display: none;
}
@media (max-width: 768px) {
    .ipsLayout__app {
    margin-bottom: 55px;
    }
}

Edited by Moestuin

Hook target: mobile footer menu == when you press on menu, the menu pops open, and you can add items there.
image.png

Edited by Moestuin

3 minutes ago, Como said:

But I remain confused by we are creating a whole new footer.

Me too, i have not found a way to edit the current template in v5. Only can add things before or after blocks. Or i think you will have to make an entire theme.
Thats why i just copy the entire template, and hide the orginial bar. For me this also feels like a workaround, but i don't know how to do it on a other way.

I did this in the above CSS example. It feels a bit like a 'hack'. But it works.

Try this, add this javascript to your theme

document.addEventListener('DOMContentLoaded', function() {
  const footerNav = document.querySelector('#ipsMobileFooter');
  if (footerNav) {
    footerNav.addEventListener('click', function(event) {
      const target = event.target;
      const liElement = target.closest('li.ipsMobileFooter__item[data-el="chat"]');
      if (liElement && footerNav.contains(liElement)) {
        // Your code to execute when the specific <li> is clicked
        console.log('Clicked on the <li> with data-el="chat" inside #ipsMobileFooter');
		const realIcon = document.getElementById("floating-chat-icon");
        realIcon?.click();
      }
    });
  }
});


This will do when you click on your own icon, javascript triggers, a click on the other icon.

const realIcon = document.getElementById("floating-chat-icon");
realIcon?.click();

I think that should work.

Don't forget to change this like for you footer button: <li data-el="more" class="ipsMobileFooter__item"> to <li data-el="chat" class="ipsMobileFooter__item"> Only at your button, Not the Menu button.

Edited by Moestuin

Ok, do your button like tike this:

<button class="ipsMobileFooter__link" aria-expanded="false" data-chat-trigger="true">

change javascript to:

document.addEventListener('DOMContentLoaded', function () {
  const customChatButton = document.querySelector('[data-chat-trigger="true"]');
  if (customChatButton) {
    customChatButton.addEventListener('click', function () {
      const realIcon = document.getElementById('floating-chat-icon');
      realIcon.click();
    });
  }
});

just hide the orginal chat button on mobile:

css style
@media (max-width: 768px) {

#floating-chat-icon {

display: none !important;

}

}

Edited by Moestuin

  • Author

On 5/13/2025 at 5:48 PM, Moestuin said:

Correction to css:

.ipsMobileFooter {
  position: fixed;       /* Fixes the footer relative to the viewport */bottom: 0;             /* Positions it at the bottom of the screen */left: 0;               /* Aligns it to the left edge */width: 100%;           /* Makes it span the full width */z-index: 9999;         /* Ensures it stays on top of other elements */
}
.ipsMobileFooter:nth-of-type(2) {
  display: none;
}
@media (max-width: 768px) {
    .ipsLayout__app {
    margin-bottom: 55px;
    }
}

Note: The black footer area was not playing nice with the footer menu bar at some widths - dropping below the menu bar - I had to change @media (max-width: 768px to 979px.

Ok works like a charm.

First open you hook, copy out all code to temp txt, then delete the hook.
Open up the css, and delete the CSS

.ipsMobileFooter {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}
.ipsMobileFooter:nth-of-type(2) {
  display: none;
}
@media (max-width: 979px) {
    .ipsLayout__app {
    margin-bottom: 55px;
    }
}


Then go to admin CP, to your theme, then open CSS/Javascript. Open javascript tab to add javascript.

Goto you txt, and copy out your piece of code for the button. From: <li data-el="chat" class="ipsMobileFooter__item"> everything inbetween and </in>

(function(){
	const mobileMoreButton = document.querySelector('[data-ips-hook="mobileFooter"] [data-el="more"]');
	mobileMoreButton.insertAdjacentHTML("beforebegin", `
         COPY THE <li> </li> HERE
	`);
})();

Then save. And it shoot be good.

Recently Browsing 0

  • No registered users viewing this page.

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.