Демо-сайт: http://mocne-menu.freeiz.com/
Скрин:
![Прикрепленный файл](https://shopcms.vsupport.club/public/style_extra/mime_types/gif.gif)
Отправлено 29 January 2013 - 06:30 PM
Отправлено 29 January 2013 - 06:56 PM
Отправлено 29 January 2013 - 07:09 PM
Отправлено 29 January 2013 - 07:59 PM
<ul id="menu"> {if $big_categories_tree && $big_categories_tree_count>0} {section name=h loop=$big_categories_tree} {if $big_categories_tree[h].parent == 1} <li class="{if $big_categories_tree[h].subcount > 0}drop {/if}{if $categoryID == $big_categories_tree[h].categoryID}active {/if}"> <a href="{if $smarty.const.CONF_MOD_REWRITE eq 1}category_{$big_categories_tree[h].categoryID}.html{else}index.php?categoryID={$big_categories_tree[h].categoryID}{/if}" {if $categoryID == $big_categories_tree[h].categoryID}class="bf"{/if}>{$big_categories_tree[h].name}</a> {if $big_categories_tree[h].subcount > 0} <div class="dropdown_3columns"> <div class="col_1"> <ul> {assign var="tmp" value=0} {section name=h1 loop=$big_categories_tree} {if $big_categories_tree[h1].parent == $big_categories_tree[h].categoryID} {assign var="tmp" value=`$tmp+1`} <li> <a href="{if $smarty.const.CONF_MOD_REWRITE eq 1}category_{$big_categories_tree[h1].categoryID}.html{else}index.php?categoryID={$big_categories_tree[h1].categoryID}{/if}" {if $categoryID == $big_categories_tree[h1].categoryID}class="bf"{/if}>{$big_categories_tree[h1].name}</a> </li> {if $tmp is div by 3 && !$smarty.section.h1.last}</ul></div><div class="col_1"><ul>{assign var="tmp" value=0}{/if} {/if} {/section} </ul> </div> <div> {/if} </li> {/if} {/section} {else} <div align="center">{$smarty.const.STRING_NO_CATEGORIES}</div> {/if} </ul>
Отправлено 29 January 2013 - 08:36 PM
Отправлено 29 November 2013 - 05:18 PM
Отправлено 29 November 2013 - 05:25 PM
напримерz-index: 99
Отправлено 02 December 2013 - 11:23 PM
Отправлено 03 December 2013 - 12:30 AM
margin: 30px auto 0; width: 100%;
Отправлено 03 December 2013 - 12:59 AM
Отправлено 10 December 2013 - 11:26 AM
<li id="menu-item-22" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22 {if $smarty.server.REQUEST_URI == '/page_0.html'}current-menu-item current_page_item{/if}"> <a >Магазин</a> {if $categories_tree} <ul class="sub-menu" style="display: none; visibility: hidden;"> {section name=h loop=$big_categories_tree} {if $big_categories_tree[h].categoryID != 1} <li class="level_{$big_categories_tree[h].level}_parent_"> {section name=j loop=$big_categories_tree max=$big_categories_tree[h].level} {/section} {if $smarty.const.CONF_SHOW_COUNTPROD eq 1}<span style="float:right"> {$big_categories_tree[h].products_count}</span>{/if} <a href="{if $smarty.const.CONF_MOD_REWRITE eq 1}category_{$big_categories_tree[h].categoryID}.html{else}index.php?categoryID={$big_categories_tree[h].categoryID}{/if}" {if $categoryID == $big_categories_tree[h].categoryID}class="bf"{/if}>{$big_categories_tree[h].name}</a> {*<br />level: {$big_categories_tree[h].level} parent: {$big_categories_tree[h].parent} след {$big_categories_tree[h.index_next].parent} categoryID: {$big_categories_tree[h].categoryID}*} {if $big_categories_tree[h].categoryID == $big_categories_tree[h.index_next].parent} <ul class="sub-menu" style="display: none; visibility: hidden;"> {/if} {if ($big_categories_tree[h.index_next].parent != $big_categories_tree[h].categoryID) } </li> {/if} {if $big_categories_tree[h.index_next].level != $big_categories_tree[h].level} {if ($big_categories_tree[h.index_next].parent != $big_categories_tree[h].categoryID) } </ul> {/if} {/if} {if $smarty.section.h.index ne $big_categories_tree_count-1} {/if} {/if} {/section} </ul> {/if} </li>которым выводится менюшка: Главная Магазин О магазине,
Отправлено 07 April 2014 - 12:42 PM
Отправлено 07 April 2014 - 03:34 PM
Увеличить z-index у менюшек либо уменьшить у названий блоков.выпадающее меню перекрывается названиями блоков (см. в прикрепленном изображении). Как это можно решить?
Отправлено 07 April 2014 - 08:45 PM
Спасибо за помощь! Все получилось как надо.Увеличить z-index у менюшек либо уменьшить у названий блоков.выпадающее меню перекрывается названиями блоков (см. в прикрепленном изображении). Как это можно решить?
Если не понятно, что такое z-index, то почитать об этом на htmlbook.ru/css/z-index, где-то там.
Отправлено 12 January 2015 - 12:53 PM
Сегодня именно это меню сделал для заказчика ( совпадение ? )
код для этого меню на 2 уровня, разделение по колонкам по 3 элемента<ul id="menu"> {if $big_categories_tree && $big_categories_tree_count>0} {section name=h loop=$big_categories_tree} {if $big_categories_tree[h].parent == 1} <li class="{if $big_categories_tree[h].subcount > 0}drop {/if}{if $categoryID == $big_categories_tree[h].categoryID}active {/if}"> <a href="{if $smarty.const.CONF_MOD_REWRITE eq 1}category_{$big_categories_tree[h].categoryID}.html{else}index.php?categoryID={$big_categories_tree[h].categoryID}{/if}" {if $categoryID == $big_categories_tree[h].categoryID}class="bf"{/if}>{$big_categories_tree[h].name}</a> {if $big_categories_tree[h].subcount > 0} <div class="dropdown_3columns"> <div class="col_1"> <ul> {assign var="tmp" value=0} {section name=h1 loop=$big_categories_tree} {if $big_categories_tree[h1].parent == $big_categories_tree[h].categoryID} {assign var="tmp" value=`$tmp+1`} <li> <a href="{if $smarty.const.CONF_MOD_REWRITE eq 1}category_{$big_categories_tree[h1].categoryID}.html{else}index.php?categoryID={$big_categories_tree[h1].categoryID}{/if}" {if $categoryID == $big_categories_tree[h1].categoryID}class="bf"{/if}>{$big_categories_tree[h1].name}</a> </li> {if $tmp is div by 3 && !$smarty.section.h1.last}</ul></div><div class="col_1"><ul>{assign var="tmp" value=0}{/if} {/if} {/section} </ul> </div> <div> {/if} </li> {/if} {/section} {else} <div align="center">{$smarty.const.STRING_NO_CATEGORIES}</div> {/if} </ul>
css, можно взять по ссылке из первого поста
Отправлено 12 December 2015 - 10:54 AM
{*горизонтальное меню*} <link rel="stylesheet" href="data/{$smarty.const.TPL}/menu.css" type="text/css" media="all" /> <ul id="menu"> {if $big_categories_tree && $big_categories_tree_count>0} {section name=h loop=$big_categories_tree} {if $big_categories_tree[h].parent == 1} <li class="{if $big_categories_tree[h].subcount > 0}drop {/if}{if $categoryID == $big_categories_tree[h].categoryID}active {/if}"> <a href="{if $smarty.const.CONF_MOD_REWRITE eq 1}category_{$big_categories_tree[h].categoryID}.html{else}index.php?categoryID= {$big_categories_tree[h].categoryID}{/if}" {if $categoryID == $big_categories_tree[h].categoryID}class="bf"{/if}> {$big_categories_tree[h].name}</a> {if $big_categories_tree[h].subcount > 0} <div class="dropdown_5columns"> <div class="col_2"> <ul> {assign var="tmp" value=0} {section name=h1 loop=$big_categories_tree} {if $big_categories_tree[h1].parent == $big_categories_tree[h].categoryID} {assign var="tmp" value=`$tmp+1`} <li> <table> <tr> <td><a href="{if $smarty.const.CONF_MOD_REWRITE eq 1}category_{$big_categories_tree[h1].categoryID}.html{else}index.php?categoryID={$big_categories_tree[h1].categoryID}{/if}" {if $categoryID == $big_categories_tree[h1].categoryID} class="bf"{/if}><img src="data/category/{$big_categories_tree[h1].picture}" alt="{$big_categories_tree[h1].name}" title="{$big_categories_tree[h1].name}" align="left" style="max-width:60px; max-height:60px;"></td> <td><a href="{if $smarty.const.CONF_MOD_REWRITE eq 1}category_{$big_categories_tree[h1].categoryID}.html{else}index.php?categoryID={$big_categories_tree[h1].categoryID}{/if}" {if $categoryID == $big_categories_tree[h1].categoryID} class="bf"{/if}> {$big_categories_tree[h1].name}</a></td> </tr> </table> </li> {if $tmp is div by 6 && !$smarty.section.h1.last}</ul></div><div class="col_2"><ul>{assign var="tmp" value=0}{/if} {/if} {/section} </ul> </div> <div> {/if} </li> {/if} {/section} {else} <div align="center">{$smarty.const.STRING_NO_CATEGORIES}</div> {/if} </ul> {*конец горизонтальное меню*}
Отправлено 12 December 2015 - 01:16 PM
Конкретно в этом меню не знаю, не пробовал.Ткните пожалуйста носом как сделать так, чтоб выпадающая часть меню автоматом выпадала либо влево, либо вправо. Чтоб позиционировалась правильно. А то в этом варианте меню выпадает всегда вправо и для категорий, которые в правой части меню подкатегории оказываются за экраном
Отправлено 12 December 2015 - 01:22 PM
Отправлено 12 December 2015 - 08:34 PM