Skip to content

Editing the menu

William Jacoby edited this page Sep 28, 2026 · 1 revision

The whole menu lives in one file inside the extension:

ext/phpbbmodders/menu/styles/all/template/event/overall_header_navbar_before.html

Edit it with any text editor, upload it, then purge the board cache (ACP → General → Purge the cache) so phpBB picks up the change.

Keep a copy of your edited file. Updating the extension replaces this file with the default one, so copy your version back after each update.

How the file is laid out

<a class="bbm-menu-toggle" role="button">Menu</a>

<ul class="bbm-menu">
	<li><a href="https://www.example.com/">Home</a></li>
	…
</ul>
  • The first line is the Menu button that shows and hides the menu on small screens. Leave it as it is.
  • Every menu entry is one <li> inside <ul class="bbm-menu">, in the order they appear.

Add a link

One line per link:

<li><a href="https://www.example.com/blog/">Blog</a></li>

Link to board pages

phpBB provides the addresses of its own pages, so you don't have to type them (and they keep working if the board moves):

<li><a href="{{ U_INDEX }}">Forums</a></li>
<li><a href="{{ U_SEARCH }}">Search</a></li>
<li><a href="{{ U_MEMBERLIST }}">Members</a></li>
<li><a href="{{ U_TEAM }}">The team</a></li>
<li><a href="{{ U_FAQ }}">FAQ</a></li>
<li><a href="{{ U_CONTACT_US }}">Contact us</a></li>

U_SITE_HOME is the Site home URL set in ACP → General → Board settings, if you've set one.

U_TEAM and U_CONTACT_US are empty when the viewer isn't allowed to see the team page, or when the board's contact form is switched off. Wrap those two in a check so the menu never shows a dead link:

{% if U_CONTACT_US %}<li><a href="{{ U_CONTACT_US }}">Contact us</a></li>{% endif %}

Add a dropdown

A dropdown is an entry with role="button" instead of a link, followed by its own <ul> of entries:

<li>
	<a role="button">Help</a>
	<ul>
		<li><a href="{{ U_FAQ }}">FAQ</a></li>
		<li><a href="https://www.example.com/rules/">Rules</a></li>
		<li><a href="{{ U_CONTACT_US }}">Contact us</a></li>
	</ul>
</li>

Show an entry only to logged-in users (or only to guests)

This works without any other extension:

{% if S_USER_LOGGED_IN %}
	<li><a href="{{ U_MEMBERLIST }}">Members</a></li>
{% else %}
	<li><a href="{{ U_REGISTER }}">Register</a></li>
{% endif %}

Show an entry only to one group

For example, a Tools dropdown only your staff can see. This needs the Group Switches extension; see Group Switches.

{% if S_GROUP_528 %}
	<li>
		<a role="button">Tools</a>
		<ul>
			<li><a href="https://www.example.com/tools/">Staff tools</a></li>
		</ul>
	</li>
{% endif %}

Remove an entry

Delete its whole <li> … </li> block. For a dropdown, that's everything from <li> down to the matching </li> after its inner </ul>.

If something goes wrong

  • Nothing changed: purge the board cache.
  • The page shows a template error: a {% if %} is missing its {% endif %}, or a <li>/<ul> isn't closed. Compare with the original file from the extension download.
  • A group-only entry never shows: Group Switches isn't installed and enabled, or the group ID is wrong; see Group Switches.