Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Extending the admin menu (LH side)


4 Posts   328 Views

Little Giant

14 May 2014 at 10:33am Community Member, 4 Posts

Hey folks,

My developers are constantly running into an issue where they have too many admin items in the LH main menu - potentially confusing the h*ll out of the client. What I have asked is that they group related functions into a group menu item eg. "Settings" or "Communication" etc.

Ideally, when a group tab is clicked it will expand to reveal further sub functions. Accordian style - but does not have to involve any complex Jquery.

Has anyone discovered a way of extending the default admin menu so that child lists could be inserted - as they have indicated this would be a major update? It seems a very simple concept to me??

As a (very crude) example...

<li class="link" id="Menu-Communication" title="Communication">
<a href="admin/business-registrations/">
<span class="icon icon-16 icon-communication">&nbsp;</span>
<span class="text">Communication</span>

<!-- insert child functions -->
<li>Newsletter signups</li>
<li>Business Registrations</li>
<li>Personal Registrations</li>

Little Giant

15 May 2014 at 8:25am Community Member, 4 Posts

So judging by the lack of response... this may be a common issue?


15 May 2014 at 4:07pm Community Member, 79 Posts


You can create sub-menu.

Copy and paste framework/admin/templates/Includes/ to mysite/templates/Includes/

SilverStripe will pick the new menu, also flush the cache ie ?flush=all.

On my previous project, PM asked me to create two sub-menus under Files, i copied the menu template, and updated like mentioned below.

      <% loop $MainMenu %>
         <li class="$LinkingMode $FirstLast <% if $LinkingMode == 'link' %><% else %>opened<% end_if %>" id="Menu-$Code" title="$Title.ATT">
            <a href="$Link" $AttributesHTML>
               <span class="icon icon-16 icon-{$Code.LowerCase}">&nbsp;</span>
               <span class="text">$Title</span>
            <% if Code == 'AssetAdmin' %>
                  <li class="first <% if Top.class == 'AssetAdmin' %>current<% end_if %>" id="Menu-AssetAdmin">
                     <a href="admin/assets/">
                        <span class="text">Edit</span>
                  <li class="last <% if Top.class == 'CMSFileAddController' %>current<% end_if %>" id="Menu-CMSFileAddController">
                     <a href="admin/assets/add">
                        <span class="text">Add files</span>
            <% end_if %>
      <% end_loop %>


Little Giant

15 May 2014 at 4:19pm Community Member, 4 Posts

Thank you Thomas. That looks really good - I have passed onto my devs, I am sure they will be eager to try it out :)