Results 1 to 2 of 2

Thread: Superfish extension in 3.0

  1. #1
    New user
    Join Date
    08-30-10.
    Posts
    23

    Default Superfish extension in 3.0

    I installed contao 3.0 and began working up a web site. I was happy to see that jquery can now be easily included, and that the superfish drop down menu system was now available as an extension. But superfish wasn't even close to working right out of the box and it took me a few hours of troubleshooting to get it running. Here's what I had to do:

    #1 - The superfish javascipt is neither loaded nor initialized, so you have to do both those things by placing the following code in the Custom JavaScript code box of your layout:

    Code:
    <script src="/system/modules/superfish/assets/js/superfish.js"></script>
    <script> 
        $(document).ready(function(){ 
            $("ul.sf-menu").superfish(); 
        }); 
    </script>
    #2 - I used superfish in the regular horizontal mode with drop down sub menus. With the stock style sheets that come with the extension there isn't enough height to allow the drop downs to appear on screen. So it's necessary to increase the height of the nav.mod_navigation block, then re-position the article block beneath it so that the content isn't pushed way down on the page. I used this css code in my style sheet:
    Code:
    nav.mod_navigation {
        height:300px;
    }
    div.mod_article {
        bottom:250px;
        position:relative;
    }
    Hopefully this will save others a few hours of their time. I think that a horizontal drop down menu system that is extemely user friendly is a glaring omission in the contao cms and is a deal breaker for many newbie developers. Hopefully this will be strengthened up in the next version of Contao and become an asset and not a deficit.

  2. #2
    New user
    Join Date
    01-07-14.
    Posts
    3

    Default I found a more simple solution, see if it works for you

    I saw as well that extension superfish drop down menu was not working properly, the second level didn't show and even the first level was not possible to click, so what I did was:
    1) I hidden the style: superfish > .block
    2) I added in the style .sf-menu ul li : position:relative; display:block;

    No it is working for me.

    I hope it can help some else

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •