Vladimirovich
Участники
- Сообщения
- 2
- Реакции
- 0
- Баллы
- 8,098
Здравствуйте! На повестке дня вопрос о возможности создавать дополнительные кнопки подменю.
В данной теме обсуждалось как создать свои страницы для xenforo. Я использовал сие чудо, но так и не смог там же создать кнопки подменю. Само подменю впринципе можно вставить, но к сожалению я не смог привязать несколько страниц к одному пункту меню.
Собственно примеры:
Правка шаблона "navigation"
Оригинал:
Если сделать как показано ниже, то подменю имеется, но при нажатии на кнопку "Test1" или "Test2", то выделение с пункта меню слетает и страница "Test1" или "Test2" как бы сами по себе:
При открытии страницы "Test1" или "Test2" происходит переключение на:
Данную проблему можно наглядно изучить:
В данной теме обсуждалось как создать свои страницы для xenforo. Я использовал сие чудо, но так и не смог там же создать кнопки подменю. Само подменю впринципе можно вставить, но к сожалению я не смог привязать несколько страниц к одному пункту меню.
Собственно примеры:
Правка шаблона "navigation"
Оригинал:
Код:
<!-- extra tabs: middle -->
<xen:if is="{$extraTabs.middle}">
<xen:foreach loop="$extraTabs.middle" key="$extraTabId" value="$extraTab">
<xen:if is="{$extraTab.linksTemplate}">
<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupControl PopupClosed'}">
<a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
<a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>
<div class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}">
<div class="primaryContent menuHeader">
<h3>{$extraTab.title}</h3>
<div class="muted">{xen:phrase quick_links}</div>
</div>
{xen:raw $extraTab.linksTemplate}
</div>
</li>
<xen:else />
<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'PopupClosed'}">
<a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
<xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
</li>
</xen:if>
</xen:foreach>
</xen:if>
Код:
<!-- extra tabs: middle -->
<xen:if is="{$extraTabs.middle}">
<xen:foreach loop="$extraTabs.middle" key="$extraTabId" value="$extraTab">
<xen:if is="{$extraTab.linksTemplate}">
<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupControl PopupClosed'}">
<a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
<a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>
<div class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}">
<div class="primaryContent menuHeader">
<h3>{$extraTab.title}</h3>
<div class="muted">{xen:phrase quick_links}</div>
</div>
{xen:raw $extraTab.linksTemplate}
</div>
</li>
<xen:else />
<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'PopupClosed'}">
<a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
<xen:if is="{$extraTab.selected}"><div class="tabLinks"><div class="primaryContent menuHeader">
<h3>{$extraTab.title}</h3>
<div class="muted">{xen:phrase quick_links}</div>
</div>
<ul class="secondaryContent blockLinksList">
<xen:hook name="navigation_tabs_members">
<li><a href="ru/test1">Test1</a></li>
<li><a href="bru/test2">Test2</a></li>
</xen:hook>
</ul></div></xen:if>
</li>
</xen:if>
</xen:foreach>
</xen:if>
Код:
<!-- no selection -->
<xen:if is="!{$selectedTab}">
<li class="navTab selected"><div class="tabLinks"></div></li>
</xen:if>
</ul>
<xen:if is="{$visitor.user_id}"><xen:include template="navigation_visitor_tab" /></xen:if>
</div>
<span class="helper"></span>
</nav>
</div>
</div>
Надеюсь на помощь. Если что не так, поправьте.У Вас недостаточно прав для просмотра ссылок. Вход или Регистрация