Jump to content

Keep layered nav block sections closed by default


Recommended Posts

  • 1 month later...
  • 2 years later...

Hello All,

 

Surprising that there's no answer after 3 years... Here is the solution I've found :

 

In modules > blocklayered > blocklayered.tpl do the following changes :

<span class="layered_close"><a href="#" data-rel="ul_layered_{$filter.type}_{$filter.id_key}"></a></span>
<ul id="ul_layered_{$filter.type}_{$filter.id_key}">

Change for :

<span class="layered_close closed"><a href="#" data-rel="ul_layered_{$filter.type}_{$filter.id_key}"><</a></span>
<ul id="ul_layered_{$filter.type}_{$filter.id_key}" style="display: none;"> 

That should do :) Don't forget to check if your theme is using its own version of the blocklayered module :

 

Go to themes > your_theme > modules > blocklayered > blocklayered.tpl

If the file exists then do the change in this file.

  • Like 1
Link to comment
Share on other sites

Thank you so much ... works fine.

 

note:  in the solution above change for 88. there is an extra '<' before the closing </a> tag that should not be there.

 

my finished code looked like this:

<span class="layered_close closed">
      <a href="#" data-rel="ul_layered_{$filter.type}_{$filter.id_key}"></a>
</span>
</div>
<ul id="ul_layered_{$filter.type}_{$filter.id_key}" class="col-lg-12 layered_filter_ul{if isset($filter.is_color_group) && $filter.is_color_group} color-group{/if}" style="display: none;">
Edited by aussieme (see edit history)
Link to comment
Share on other sites

I have just noticed that with this fix although the accordians are closed, to get them to open you need to click them twice.

 

Anyone know why this may be? or how to fix?

 

here is a URL: http://thecozbar.com.au/store/17-piha?live_configurator_token=be7a1a3b7b70c5e30da77bd1f1b4daae&id_shop=1&id_employee=1&theme=&theme_font=

Edited by aussieme (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...