rottenteeth Posted March 2, 2021 Share Posted March 2, 2021 Hi, i would like to make menu item not collapsed? Exactly, this is the "Store" menu. 0 Quote Link to comment Share on other sites More sharing options...
rottenteeth Posted March 2, 2021 Author Share Posted March 2, 2021 I want to it allways be uncollapsed menu 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 3, 2021 Share Posted March 3, 2021 is that a sidebar or are you using a custom theme ? 0 Quote Link to comment Share on other sites More sharing options...
rottenteeth Posted March 3, 2021 Author Share Posted March 3, 2021 yes, that is a sidebar this is the html section <a role="button" data-toggle="collapse" data-parent="#wdesaccordion" href="#Primary_Navbar-Store" aria-expanded="false" aria-controls="Primary_Navbar-Store" class="fal fa-shopping-cart menu-icon-new">Oferta<span class="fal fa-angle-down"></span></a> this is the header.tpl file <!DOCTYPE html> <html lang="en"> <head> <meta charset="{$charset}" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>{if $kbarticle.title}{$kbarticle.title} - {/if}{$pagetitle} - {$companyname}</title> {include file="$template/includes/head.tpl"} {$headoutput} </head> <body class="body" data-phone-cc-input="{$phoneNumberInputStyle}"> {$headeroutput} <!-- Loading --> <div class="wdes-loading"> <div class="wdes-loader wdes-loader-icon"> <div class="line line1"></div> <div class="line line2"></div> <div class="line line3"></div> </div> </div> <div class="wdes-wrapper"> <div id='stars'></div> <div id='stars2'></div> <div id='stars3'></div> {if ($templatefile ne 'login') && ($templatefile ne 'clientregister')} <!-- Wdes SideBar --> {include file="$template/wdes/wdes-sidebar.tpl"} <!-- WHMCS Sidebar --> {if ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren()) && $templatefile ne 'configureproductdomain' && $templatefile ne 'configureproduct' && $templatefile ne 'viewcart'} <div class="whm-sidebar"> {include file="$template/includes/sidebar.tpl" sidebar=$primarySidebar} {include file="$template/includes/sidebar.tpl" sidebar=$secondarySidebar} </div> {/if} {/if} <!-- Wdes Content --> <div class="wdes-content"> <!-- Header --> <section id="header"> <div class="container"> <ul class="top-nav"> <!-- Language --> {if $languagechangeenabled && count($locales) > 1} <li class="wdes-language-item"> <a href="#" class="choose-language" data-toggle="popover" id="languageChooser"> <span class="fal fa-language"></span> </a> <div id="languageChooserContent" class="hidden"> <ul> {foreach $locales as $locale} <li> <a href="{$currentpagelinkback}language={$locale.language}">{$locale.localisedName}</a> </li> {/foreach} </ul> </div> </li> {/if} </ul> <!-- Logo --> <a href="{$WEB_ROOT}/index.php" class="logo"> <img src="{$WEB_ROOT}/templates/{$template}/img/theme-dark-logo.png" alt="{$companyname}"> </a> </div> </section> <section class="col-md-12" id="main-body"> {include file="$template/includes/verifyemail.tpl"} <div class="container{if $skipMainBodyContainer}-fluid without-padding{/if}"> <div class="row"> {if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())} {if $primarySidebar->hasChildren() && !$skipMainBodyContainer} <div class="col-md-12"> {include file="$template/includes/pageheader.tpl" showbreadcrumb=true desc=$tagline} </div> {/if} {/if} <!-- Container for main page display content --> <div class="{if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())}col-md-12{else}col-xs-12{/if} main-content"> {if !$primarySidebar->hasChildren() && !$showingLoginPage && !$inShoppingCart && $templatefile != 'homepage' && !$skipMainBodyContainer} {include file="$template/includes/pageheader.tpl" showbreadcrumb=true desc=$tagline} {/if} 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 3, 2021 Share Posted March 3, 2021 2 hours ago, rottenteeth said: yes, that is a sidebar then you should be able to close it with a hook... 🙂 0 Quote Link to comment Share on other sites More sharing options...
rottenteeth Posted March 5, 2021 Author Share Posted March 5, 2021 Everything is right with your tip and code. But I only want to change the style of my current shop category, excatly I want to make the categories be uncollapse. I don't know how to say it. It have to be just like delete the.. data-toggle="collapse" .. from the button which is Store menu item. And with this also remove the mark point which is on the right side of this menu item. I hope you can understand me.. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 5, 2021 Share Posted March 5, 2021 6 hours ago, rottenteeth said: I hope you can understand me.. I think so, i'm trying to. 🙂 6 hours ago, rottenteeth said: And with this also remove the mark point which is on the right side of this menu item. what i'm assuming that you want to do is... do not show product groups in that menu (Hosting WWW, Hosting Reseller etc). minimise that menu content (e.g collapse it). remove the ^ and what you really want is just a "Store" link on that menu that goes to cart.php (or wherever). if that's the case, I think your menu is really a vertical navbar rather than a sidebar... and if that's the case, then the navbar hook below should remove the store link (and all the product groups inside it), and add a new 'Store' link that goes to the cart.php page. <?php # Remove Store From Navbar Hook # Written by brian! use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Store'))) { $primaryNavbar->removeChild('Store'); $primaryNavbar->addChild('Store2', array('label' => Lang::trans('navStore'),'uri' => 'cart.php','order' => 10,)); } }); using the Six template, then it would change the first image to the second.... however, from that code, I think you are using the Digit theme - it should work with that template too. 0 Quote Link to comment Share on other sites More sharing options...
rottenteeth Posted March 8, 2021 Author Share Posted March 8, 2021 (edited) So.. not excatly like this way.. this code just make another single menu item.. I want to make this like this. Before I have Store with dropdown elements <a role="button" data-toggle="collapse" data-parent="#wdesaccordion" href="#Primary_Navbar-Store" aria-expanded="false" aria-controls="Primary_Navbar-Store" class="fal fa-shopping-cart menu-icon-new"> Store <span class="fal fa-angle-down"></span> </a> After I have also the same Store menu item but without option to collapse and always stay uncollapsed. - remove data-toggle="collapse" - remove <span class="fal fa-angle-down"></span> <a role="button" data-parent="#wdesaccordion" href="#Primary_Navbar-Store" aria-expanded="false" aria-controls="Primary_Navbar-Store" class="fal fa-shopping-cart menu-icon-new"> Store </a> It would be presented like this Is this possible to do with hooks or something else? Edited March 8, 2021 by rottenteeth 0 Quote Link to comment Share on other sites More sharing options...
rottenteeth Posted March 8, 2021 Author Share Posted March 8, 2021 you're right.. this is this template Digit - Responsive WHMCS Client Area Template 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 8, 2021 Share Posted March 8, 2021 45 minutes ago, rottenteeth said: - remove data-toggle="collapse" - remove <span class="fal fa-angle-down"></span> they will both be being added automatically by navbar.tpl or whatever the equivalent is in Digit. if the menu auto opens, then you might be able to get away with using CSS to hide the span within the <a> link... but equally if it's only 5 links, you could add them manually with a hook, or loop through the available product groups and output them. for specific Digit advice, you really should contact the developer - assuming that you have bought the theme. 🙂 0 Quote Link to comment Share on other sites More sharing options...
rottenteeth Posted March 12, 2021 Author Share Posted March 12, 2021 Ok.. I did it manualy.. seems to be just like I wanted it looks like And know.. I have another question.. How to add style to this menu item via hooks? I mean.. I want to be the menu item "Hosting" always be :hover menu item.. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.