Jump to content

Избавляемся от дублированных вкладок навигации

При обновлении форума до версии 3.3.x, у многих в  навигации  стало по две  вкладки  Форумы и Пользователи. Для исправления этого нам потребуется изменить шаблона globalTemplate, находим:

{parse variable="forumActive" default="" oncondition="IPS_APP_COMPONENT == 'forums'" value="active"}
{parse variable="membersActive" default="" oncondition="IPS_APP_COMPONENT == 'members'" value="active"}
{parse variable="helpActive" default="" oncondition="IPS_APP_COMPONENT == 'core' AND $this->request['module'] == 'help'" value="active"}
<if test="!ipsRegistry::$applications['forums']['app_hide_tab'] && !count(ipsRegistry::$applications['forums']['app_tab_groups']) && !IPSMember::isInGroup( $this->memberData, ipsRegistry::$applications['forums']['app_tab_groups'] )"><li id='nav_discussion' class='left {parse variable="forumActive"}'><a href='{parse url="act=idx" seotitle="false" base="public"}' title='{$this->lang->words['go_to_discussion']}'>{IPSLib::getAppTitle( 'forums' )}</a></li></if>
<if test="!ipsRegistry::$applications['members']['app_hide_tab'] && !count(ipsRegistry::$applications['members']['app_tab_groups']) && !IPSMember::isInGroup( $this->memberData, ipsRegistry::$applications['members']['app_tab_groups'] )"><li id='nav_members' class='left {parse variable="membersActive"}'><a href='{parse url="app=members&amp;module=list" base="public" template="members_list" seotitle="false"}' title='{$this->lang->words['go_to_memberlist']}'>{IPSLib::getAppTitle( 'members' )}</a></li></if>
<if test="applicationsloop:|:is_array($header_items['applications']) AND count($header_items['applications'])">
			<foreach loop="applications:$header_items['applications'] as $data">
							<if test="showingapp:|:$data['app_show']">
											{parse variable="appActive" default="" oncondition="$data['app_active']" value="active"}
											<li id='nav_app_{$data['app_dir']}' class="left {parse variable="appActive"}"><a href='{parse url="{$data['app_link']}" seotitle="false" base="public"}' title='{parse expression="sprintf( $this->lang->words['go_to_prefix'], IPSLib::getAppTitle($data['app_dir']) )"}'>{IPSLib::getAppTitle($data['app_dir'])}</a></li>
							</if>
			</foreach>
</if>


Заменить на:

<if test="hasCustomPrimaryNavigation:|:!empty($header_items['primary_navigation_menu'])">
			{$header_items['primary_navigation_menu']}
<else />
			<if test="applicationsloop:|:is_array($header_items['applications']) AND count($header_items['applications'])">
							<foreach loop="applications:$header_items['applications'] as $data">
											<if test="showingapp:|:$data['app_show']">
															{parse variable="appActive" default="" oncondition="$data['app_active']" value="active"}
															<li id='nav_app_{$data['app_dir']}' class="left {parse variable="appActive"}"><a href='{parse url="{$data['app_link']}" seotitle="{$data['app_seotitle']}" template="{$data['app_template']}" base="{$data['app_base']}"}' title='{parse expression="sprintf( $this->lang->words['go_to_prefix'], IPSLib::getAppTitle($data['app_dir']) )"}'>{IPSLib::getAppTitle($data['app_dir'])}</a></li>
											</if>
							</foreach>
			</if>
</if>


PS: это связано с не обновлением стиля до версии 3.3.x

User Feedback

Recommended Comments

Комментариев пока нет

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.


Guest
Добавить комментарий...