4

I have created sidebar for my custom component by using the documentation -

How do I apply JHtmlSidebar to add a sidebar to my admin view?

I have to add some styling to the Joomla Collapsible Sidebar in admin side. I have searched but nothing found related to this.

As you can see in the image(this is just an example), Now I need to add some styling or change the design/layout of the sidebar.

Change Joomla Collapsible Sidebar in Backend

How to change the styling/layout of the collapsible sidebar?

Also is it possible without hacking core?

4

Well, as per my answer from the link you provided, you'll need to add the following to your default.php:

<div id="j-sidebar-container" class="span2">
    <?php echo $this->sidebar; ?>
</div>

So you can simply add an extra class after span2, for example:

<div id="j-sidebar-container" class="span2 mySidebar">

Then apply your own custom styling. For example

.mySidebar a {
     color: #FF0
}

if it's structural changes you need to make or adding your own classes inside of the sidebar, you'll need to make a Layout Override for the following file:

ROOT/layouts/joomla/sidebars/submenu.php

Be sure that you override is and do not edit it directly, as this will apply your changes for every extension that calls the Submenu layout.

|improve this answer|||||
  • thanks for answering @Lodder But I wanted to change all the elements like adding new styles in lists, adding own classes on the ul, select tags – Joomler Mar 10 '16 at 12:14
  • Ah, in which case you going to need to perform a layout override for the following file: ROOT/layouts/joomla/sidebars/submenu.php. Note the word "override"...do not edit this file directly – Lodder Mar 10 '16 at 12:35
  • you just gave me an awesome idea :) Ill just create an layout overrider for this. Thank you very much :) – Joomler Mar 10 '16 at 12:51
  • @Joomler - updated ;) – Lodder Mar 10 '16 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.