lor1en Posted August 30, 2010 Report Share Posted August 30, 2010 Господа, кто как реализовал раскрывающееся боковое меню с подкатегориями? Какие предложения? Quote Link to post Share on other sites
lor1en Posted August 30, 2010 Author Report Share Posted August 30, 2010 Раскрывающиеся меню с подкатегориямиВ файле index.tpl необходимо заменить:{fun name=categories_tree categories=$c->subcategories} на:{if in_array($category->category_id, $c->subcats_ids)}{fun name=categories_tree categories=$c->subcategories} {/if} Quote Link to post Share on other sites
Danya Posted September 22, 2010 Report Share Posted September 22, 2010 Если в файле index.tpl написано только это:<div class="block"><div class="block_top"><div class="block_bottom"> {include file=categories.tpl categories=$categories level=0} </div></div></div>А в файле categories.tpl написано это:{if $categories}<ul class="catalog_menu">{foreach item=c from=$categories} {if $category->category_id != $c->category_id} <li tooltip='category' category_id='{$c->category_id}'><a href='catalog/{$c->url}'>{$c->name}</a></li> {else} <li tooltip='category' category_id='{$c->category_id}'>{$c->name}</li> {/if} {include file=categories.tpl categories=$c->subcategories} {/foreach} </ul>{/if} Quote Link to post Share on other sites
Danya Posted November 19, 2010 Report Share Posted November 19, 2010 кто-то есть живой? помогите пожалуйста.в более раней версии, как можно это реализовать? Quote Link to post Share on other sites
alex007983 Posted November 24, 2010 Report Share Posted November 24, 2010 У нас на сайте субкатегория почему-то после первого клика сразу же сворачивается сразу. Подскажите пожалуйста как можно эту бодягу излечить.Код у нас такой:<a href='catalog/<?php echo $smarty->_tpl_vars['c']->url; ?>' tooltip='category' category_id='<?php echo $smarty->_tpl_vars['c']->category_id; ?>' <?php if ($smarty->_tpl_vars['category']->category_id == $smarty->_tpl_vars['c']->category_id): ?>class="active"<?php endif; ?>><?php echo $smarty->_tpl_vars['c']->name; ?></a> <?php if ($smarty->_tpl_vars['category']->category_id == $smarty->_tpl_vars['c']->category_id): ?><?php smarty_fun_categories_tree($smarty, array('categories'=>$smarty->_tpl_vars['c']->subcategories)); ?><?php endif; ?> </li> <?php endforeach; endif; unset($_from); ?> </ul> <?php endif; ?> <?php $smarty->_tpl_vars=$_fun_tpl_vars; }} smarty_fun_categories_tree($this, array('categories'=>$this->_tpl_vars['categories'])); ?> </div>У кого есть идеи? В каком направлении копать? Quote Link to post Share on other sites
afreelancer Posted January 21, 2012 Report Share Posted January 21, 2012 Как реализовать это для Simpla 2? Quote Link to post Share on other sites
alinamolchanova Posted January 22, 2012 Report Share Posted January 22, 2012 http://simpladesign.ru/razvorachivayushhiesya-podkategorii-pri-nazhatii-dlya-simpla/ Quote Link to post Share on other sites
greathun Posted August 11, 2012 Report Share Posted August 11, 2012 Сделал как был написано в последнем примере, все работает. Вопрос, как сделать чтобы при нажатии раскрывались (изначально скрыты не активные) только под категории 3 и последующих уровней? Quote Link to post Share on other sites
vda Posted August 11, 2012 Report Share Posted August 11, 2012 а вот так? кому нужно? Quote Link to post Share on other sites
greathun Posted August 12, 2012 Report Share Posted August 12, 2012 Мне Quote Link to post Share on other sites
vda Posted August 12, 2012 Report Share Posted August 12, 2012 получайте инструкцию: menu_vda.rar версия симплы 2.1.x Quote Link to post Share on other sites
daramal Posted January 26, 2013 Report Share Posted January 26, 2013 не работает Quote Link to post Share on other sites
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.