Book Image

concrete5 Beginner's Guide

Book Image

concrete5 Beginner's Guide

Overview of this book

Table of Contents (19 chapters)
concrete5
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – creating SooperFish template


  1. Go to http://www.sooperthemes.com/open-source/jquery/jquery-sooperfish-dropdown-menus and download the latest version available.

  2. Create a new directory structure for our template blocks/autonav/templates/sooperfish/js. From the downloaded ZIP file, extract jquery.sooperfish.min.js in the js directory.

  3. In the directory just mentioned, create a new file called view.php. We could copy it from the original template and rename the main ul element in case there's a second navigation on the page. Feel free to do that, but please take care that you rename all the CSS rules as well. However, in this case we're simply going to include the original template as we already have several CSS rules in the theme which are useful for our drop-down menu:

    <?php 
    $bvt = new BlockViewTemplate($b); 
    $bvt->setBlockCustomTemplate(false);
    
    include($bvt->getTemplate());
    ?>
  4. Create another file called view.js where we initialize the SooperFish menu:

    $(document).ready...