Sharing is helping.

We offer you this space to share your knowledge about Magento and learn from our experienced customers.


    Home Forums Theme Forum HelloKids & HelloKids iPhone How to get Left Navigation Menu always expanded? Reply To: How to get Left Navigation Menu always expanded?

    #15504

    Anonymous

    maybe it’s easier if i put here the code of those two files:

    so leftnav.phtml :

    “<div class=”box base-mini leftnav”>
    <div class=”head”><h2 class=”title”><?php echo $this->__(‘Product Categories’) ?></h2></div>
    <div class=”left-nav-top”></div>
    <div class=”left-nav”>
    <ul id=”left-nav”>
    <style>
    .active1 a, .active2 a{background:none;text-decoration:underline;}
    </style>
    <?php foreach ($this->getStoreCategories() as $_category): ?>
    <?php if ($_category->getIsActive()): ?>

    <?php $isactive = $this->isCategoryActive($_category); ?>
    <?php $hasChildren = $_category->hasChildren(); ?>

    <li class=”category <?php if($isactive) echo ‘active’; ?>” rel=”<?php echo $_category->getId();?>”>
    getCategoryUrl($_category) : ‘#’; ?>” >
    <span>
    <?php echo $_category->getName();?>
    </span>

    <?php echo “getCategoryUrl($_category).”‘> view “; ?>

    <?php if($hasChildren): ?>
    <ul class=”subcategory_<?php echo $_category->getId();?>” style=”display:<?php echo $isactive? ‘block’ : ‘none’; ?>;”>
    <?php foreach (Mage::getModel(‘catalog/category’)->load($_category->getId())->getChildrenCategories() as $childCategory):?>
    <?php $isactive = $this->isCategoryActive($childCategory); ?>
    <?php $hasmoreChildren = $childCategory->hasChildren(); ?>

    <li class=”category <?php if($isactive) echo ‘active1′; ?>” rel=”<?php echo $childCategory->getId(); ?>”>
    getUrl() : ‘#’; ?>” >
    <?php echo $childCategory->getName(); ?>

    <?php if($hasmoreChildren) echo ” getCategoryUrl($childCategory).”‘> [+] “; ?>

    <?php if($hasmoreChildren): ?>
    <ul class=”subcategory_<?php echo $childCategory->getId(); ?>” style=”display:<?php echo $isactive? ‘block’ : ‘none’; ?>;”>
    <?php foreach (Mage::getModel(‘catalog/category’)->load($childCategory->getId())->getChildrenCategories() as $_childCategory):?>

    <?php $isactive = $this->isCategoryActive($_childCategory);?>
    <li class=”category <?php if($isactive) echo ‘active2′;?>”>
    getUrl(); ?>” >
    <?php echo $_childCategory->getName(); ?>

    <?php endforeach; ?>

    <?php endif ?>

    <?php endforeach;?>

    <?php endif ?>
    <?php endif ?>
    <?php endforeach ?>

    </div>
    <div class=”block-footer”></div>
    </div>

    and custom.js:

    “//Back to top slider

    jQuery(document).ready(function() {

    jQuery(‘a’).each(function(){
    src=jQuery(this).attr(‘href’);
    if (src==’#') jQuery(this).attr(‘href’,'javascript:void(0)’);
    });

    jQuery(‘a[href=#totop]‘).click(function(){
    jQuery(‘html, body’).animate({scrollTop:0}, 600);
    return false;
    });

    // Custom Menu
    jQuery(“.category”).click(function() {
    //var open = jQuery(“.category”).attr(“rel”);
    var open = this.getAttributeNode(‘rel’).value;
    jQuery(“.subcategory_” + open).slideToggle(500);
    });

    jQuery(‘.category’).hover(function(){
    jQuery(this).find(“.empty”).fadeIn(500);
    },function(){
    jQuery(this).find(“.empty”).fadeOut(500);
    });

    // Cart Popout
    jQuery(“.mycart”).click(function() {
    jQuery(“.mycart-block”).slideToggle(‘medium’);
    });

    jQuery(‘#featured-products’).jcarousel();

    jQuery(“#slider”).easySlider({
    auto: true,
    continuous: true,
    numeric: false
    });

    jQuery(“a.group”).fancybox({ ‘zoomSpeedIn’: 300, ‘zoomSpeedOut’: 300, ‘overlayShow’: true });

    });

    //Cufon
    Cufon.replace(‘.base-mini .head h2′, {fontFamily: ‘arnold’});
    Cufon.replace(‘.base-mini .head h4′, {fontFamily: ‘arnold’});
    Cufon.replace(‘.mini-wishlist .head a’, {fontFamily: ‘arnold’});
    Cufon.replace(‘.page-head h3′, {fontFamily: ‘arnold’});
    Cufon.replace(‘.send-friend h1′, {fontFamily: ‘arnold’});
    Cufon.replace(‘h2.category-products’, {fontFamily: ‘arnold’});
    Cufon.replace(‘.category-head h2′, {fontFamily: ‘arnold’});
    Cufon.replace(‘.head h2′, {fontFamily: ‘arnold’});
    Cufon.replace(‘.head-alt h4′, {fontFamily: ‘arnold’});
    Cufon.replace(‘.head-alt2 h4′, {fontFamily: ‘arnold’});
    Cufon.replace(‘.head-alt2 h5′, {fontFamily: ‘arnold’});
    Cufon.replace(‘#product_sendtofriend_form h2.legend ‘, {fontFamily: ‘arnold’});
    Cufon.replace(‘.product-info-box .product-name’, {fontFamily: ‘arnold’});
    Cufon.replace(‘.mycart-block .block-title’, {fontFamily: ‘arnold’});
    Cufon.replace(‘#opc-login .head h3′, {fontFamily: ‘arnold’});
    Cufon.replace(‘#opc-billing .head h3′, {fontFamily: ‘arnold’});
    Cufon.replace(‘#opc-shipping .head h3′, {fontFamily: ‘arnold’});
    Cufon.replace(‘#opc-shipping_method .head h3′, {fontFamily: ‘arnold’});
    Cufon.replace(‘#opc-payment .head h3′, {fontFamily: ‘arnold’});
    Cufon.replace(‘#opc-review .head h3′, {fontFamily: ‘arnold’});
    Cufon.replace(‘.mycart a’, {fontFamily: ‘MyriadPro’});
    Cufon.replace(‘.regular-price .price’, {fontFamily: ‘MyriadPro’});
    Cufon.replace(‘.mycart-block .subtotal .price’, {fontFamily: ‘MyriadPro’});

    //Corner
    jQuery(‘.base-mini .content’).corner(“5px”);
    jQuery(‘.product-pricing’).corner(“10px”);
    jQuery(‘#product-options-wrapper’).corner(“top”);
    jQuery(‘.product-options-bottom’).corner(“bottom”);
    jQuery(‘.review-product-list .padder’).corner(“10px”);
    jQuery(‘.product-info-box .add-to-boxes’).corner(“10px”);
    jQuery(‘.send-friend’).corner(“10px”);
    jQuery(‘.account-box .col2-set .head-alt2′).corner(“10px”);
    jQuery(‘.account-box .address-book’).corner(“10px”);
    jQuery(‘#wishlist-sidebar li .link-cart’).corner(“5px”);
    jQuery(‘.mini-compare-products a.btn_compare’).corner(“5px”);
    jQuery(‘#nav ul’).corner(” bottom 5px”);
    jQuery(‘.one-page-checkout .active .head’).corner(“top 5px”); ”