顶部小导航/logo位置新增钩子
parent
35bdcfe98b
commit
a67754f8c0
|
|
@ -153,8 +153,17 @@ class Common extends Controller
|
||||||
// 公共底部钩子
|
// 公共底部钩子
|
||||||
$this->assign('plugins_view_common_bottom_data', Hook::listen('plugins_view_common_bottom', ['hook_name'=>'plugins_view_common_bottom', 'is_backend'=>false, 'user'=>$this->user]));
|
$this->assign('plugins_view_common_bottom_data', Hook::listen('plugins_view_common_bottom', ['hook_name'=>'plugins_view_common_bottom', 'is_backend'=>false, 'user'=>$this->user]));
|
||||||
|
|
||||||
// 公共顶部小导航钩子-左侧
|
// 公共顶部小导航钩子-左侧前面
|
||||||
$this->assign('plugins_view_header_navigation_top_left_data', Hook::listen('plugins_view_header_navigation_top_left', ['hook_name'=>'plugins_view_header_navigation_top_left', 'is_backend'=>false, 'user'=>$this->user]));
|
$this->assign('plugins_view_header_navigation_top_left_begin_data', Hook::listen('plugins_view_header_navigation_top_left_begin', ['hook_name'=>'plugins_view_header_navigation_top_left_begin', 'is_backend'=>false, 'user'=>$this->user]));
|
||||||
|
|
||||||
|
// 公共顶部小导航钩子-左侧后面
|
||||||
|
$this->assign('plugins_view_header_navigation_top_left_end_data', Hook::listen('plugins_view_header_navigation_top_left_end', ['hook_name'=>'plugins_view_header_navigation_top_left_end', 'is_backend'=>false, 'user'=>$this->user]));
|
||||||
|
|
||||||
|
// 公共顶部小导航钩子-右侧前面
|
||||||
|
$this->assign('plugins_view_header_navigation_top_right_begin_data', Hook::listen('plugins_view_header_navigation_top_right_begin', ['hook_name'=>'plugins_view_header_navigation_top_right_begin', 'is_backend'=>false, 'user'=>$this->user]));
|
||||||
|
|
||||||
|
// 公共顶部小导航钩子-右侧后面
|
||||||
|
$this->assign('plugins_view_header_navigation_top_right_end_data', Hook::listen('plugins_view_header_navigation_top_right_end', ['hook_name'=>'plugins_view_header_navigation_top_right_end', 'is_backend'=>false, 'user'=>$this->user]));
|
||||||
|
|
||||||
// 用户登录页面顶部钩子
|
// 用户登录页面顶部钩子
|
||||||
$this->assign('plugins_view_user_login_info_top_data', Hook::listen('plugins_view_user_login_info_top', ['hook_name'=>'plugins_view_user_login_info_top', 'is_backend'=>false, 'user'=>$this->user]));
|
$this->assign('plugins_view_user_login_info_top_data', Hook::listen('plugins_view_user_login_info_top', ['hook_name'=>'plugins_view_user_login_info_top', 'is_backend'=>false, 'user'=>$this->user]));
|
||||||
|
|
@ -171,6 +180,12 @@ class Common extends Controller
|
||||||
// 底部导航上面钩子
|
// 底部导航上面钩子
|
||||||
$this->assign('plugins_view_common_footer_top_data', Hook::listen('plugins_view_common_footer_top', ['hook_name'=>'plugins_view_common_footer_top', 'is_backend'=>false, 'user'=>$this->user]));
|
$this->assign('plugins_view_common_footer_top_data', Hook::listen('plugins_view_common_footer_top', ['hook_name'=>'plugins_view_common_footer_top', 'is_backend'=>false, 'user'=>$this->user]));
|
||||||
|
|
||||||
|
// logo右侧
|
||||||
|
$this->assign('plugins_view_common_logo_right_data', Hook::listen('plugins_view_common_logo_right', ['hook_name'=>'plugins_view_common_logo_right', 'is_backend'=>false, 'user'=>$this->user]));
|
||||||
|
|
||||||
|
// 公共搜索框右侧
|
||||||
|
$this->assign('plugins_view_common_search_right_data', Hook::listen('plugins_view_common_search_right', ['hook_name'=>'plugins_view_common_search_right', 'is_backend'=>false, 'user'=>$this->user]));
|
||||||
|
|
||||||
// 公共表格钩子名称动态处理
|
// 公共表格钩子名称动态处理
|
||||||
$current = 'plugins_view_index_'.$this->controller_name;
|
$current = 'plugins_view_index_'.$this->controller_name;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,20 @@
|
||||||
<ul class="top-nav-left">
|
<ul class="top-nav-left">
|
||||||
<div class="top-nav-items">
|
<div class="top-nav-items">
|
||||||
<div class="menu-hd">
|
<div class="menu-hd">
|
||||||
|
<!-- 公共顶部小导航钩子-左侧前面 -->
|
||||||
|
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
||||||
|
<div class="plugins-tag">
|
||||||
|
<span>plugins_view_header_navigation_top_left_begin</span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{if !empty($plugins_view_header_navigation_top_left_begin_data) and is_array($plugins_view_header_navigation_top_left_begin_data) and (!isset($is_footer) or $is_footer eq 1)}}
|
||||||
|
{{foreach $plugins_view_header_navigation_top_left_begin_data as $hook}}
|
||||||
|
{{if is_string($hook) or is_int($hook)}}
|
||||||
|
{{$hook|raw}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{if empty($user)}}
|
{{if empty($user)}}
|
||||||
<em>您好,欢迎来到</em>
|
<em>您好,欢迎来到</em>
|
||||||
<em>{{:MyC('home_site_name')}}</em>
|
<em>{{:MyC('home_site_name')}}</em>
|
||||||
|
|
@ -23,14 +37,14 @@
|
||||||
[<a href="{{:MyUrl('index/user/logout')}}">退出</a>]
|
[<a href="{{:MyUrl('index/user/logout')}}">退出</a>]
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<!-- 公共顶部小导航钩子-左侧 -->
|
<!-- 公共顶部小导航钩子-左侧后面 -->
|
||||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
||||||
<div class="plugins-tag">
|
<div class="plugins-tag">
|
||||||
<span>plugins_view_header_navigation_top_left</span>
|
<span>plugins_view_header_navigation_top_left_end</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if !empty($plugins_view_header_navigation_top_left_data) and is_array($plugins_view_header_navigation_top_left_data) and (!isset($is_footer) or $is_footer eq 1)}}
|
{{if !empty($plugins_view_header_navigation_top_left_end_data) and is_array($plugins_view_header_navigation_top_left_end_data) and (!isset($is_footer) or $is_footer eq 1)}}
|
||||||
{{foreach $plugins_view_header_navigation_top_left_data as $hook}}
|
{{foreach $plugins_view_header_navigation_top_left_end_data as $hook}}
|
||||||
{{if is_string($hook) or is_int($hook)}}
|
{{if is_string($hook) or is_int($hook)}}
|
||||||
{{$hook|raw}}
|
{{$hook|raw}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -39,43 +53,75 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="top-nav-right">
|
<ul class="top-nav-right">
|
||||||
{{foreach $common_nav_top_right_list as $nav}}
|
<!-- 公共顶部小导航钩子-右侧前面 -->
|
||||||
{{if empty($nav['items'])}}
|
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
||||||
<div class="top-nav-items">
|
<div class="plugins-tag">
|
||||||
<div class="menu-hd {{if isset($nav['is_login']) and $nav['is_login'] eq 1 and empty($user)}}login-event{{/if}}">
|
<span>plugins_view_header_navigation_top_right_begin</span>
|
||||||
<a href="{{if empty($user)}}javascript:;{{else /}}{{$nav.url}}{{/if}}" target="_top">
|
</div>
|
||||||
<i class="am-icon-fw {{$nav.icon}}"></i>
|
{{/if}}
|
||||||
<span>{{$nav.name}}</span>
|
{{if !empty($plugins_view_header_navigation_top_right_begin_data) and is_array($plugins_view_header_navigation_top_right_begin_data) and (!isset($is_footer) or $is_footer eq 1)}}
|
||||||
{{if isset($nav['badge']) and $nav['badge'] gt -1}}
|
{{foreach $plugins_view_header_navigation_top_right_begin_data as $hook}}
|
||||||
{{if $nav['badge'] gt 0}}
|
{{if is_string($hook) or is_int($hook)}}
|
||||||
<strong class="am-badge am-badge-danger am-round common-cart-total">{{$nav.badge}}</strong>
|
{{$hook|raw}}
|
||||||
{{else /}}
|
{{/if}}
|
||||||
<strong class="common-cart-total am-round">{{$nav.badge}}</strong>
|
{{/foreach}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<!-- 右侧导航 -->
|
||||||
|
{{if !empty($common_nav_top_right_list) and is_array($common_nav_top_right_list)}}
|
||||||
|
{{foreach $common_nav_top_right_list as $nav}}
|
||||||
|
{{if empty($nav['items'])}}
|
||||||
|
<div class="top-nav-items">
|
||||||
|
<div class="menu-hd {{if isset($nav['is_login']) and $nav['is_login'] eq 1 and empty($user)}}login-event{{/if}}">
|
||||||
|
<a href="{{if empty($user)}}javascript:;{{else /}}{{$nav.url}}{{/if}}" target="_top">
|
||||||
|
<i class="am-icon-fw {{$nav.icon}}"></i>
|
||||||
|
<span>{{$nav.name}}</span>
|
||||||
|
{{if isset($nav['badge']) and $nav['badge'] gt -1}}
|
||||||
|
{{if $nav['badge'] gt 0}}
|
||||||
|
<strong class="am-badge am-badge-danger am-round common-cart-total">{{$nav.badge}}</strong>
|
||||||
|
{{else /}}
|
||||||
|
<strong class="common-cart-total am-round">{{$nav.badge}}</strong>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
</a>
|
||||||
</a>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{else /}}
|
||||||
{{else /}}
|
<div class="top-nav-items">
|
||||||
<div class="top-nav-items">
|
<div class="am-dropdown menu-hd" data-am-dropdown>
|
||||||
<div class="am-dropdown menu-hd" data-am-dropdown>
|
<a class="am-dropdown-toggle" href="javascript:;" target="_top" data-am-dropdown-toggle>
|
||||||
<a class="am-dropdown-toggle" href="javascript:;" target="_top" data-am-dropdown-toggle>
|
<i class="am-icon-fw {{$nav.icon}}"></i>
|
||||||
<i class="am-icon-fw {{$nav.icon}}"></i>
|
<span>{{$nav.name}}</span>
|
||||||
<span>{{$nav.name}}</span>
|
<i class="am-icon-angle-down"></i>
|
||||||
<i class="am-icon-angle-down"></i>
|
</a>
|
||||||
</a>
|
<ul class="am-dropdown-content">
|
||||||
<ul class="am-dropdown-content">
|
{{foreach $nav.items as $navs}}
|
||||||
{{foreach $nav.items as $navs}}
|
<li class="{{if ((isset($nav['is_login']) and $nav['is_login'] eq 1) or (isset($navs['is_login']) and $navs['is_login'] eq 1)) and empty($user)}}login-event{{/if}}">
|
||||||
<li class="{{if ((isset($nav['is_login']) and $nav['is_login'] eq 1) or (isset($navs['is_login']) and $navs['is_login'] eq 1)) and empty($user)}}login-event{{/if}}">
|
<a href="{{if ((isset($nav['is_login']) and $nav['is_login'] eq 1) or (isset($navs['is_login']) and $navs['is_login'] eq 1)) and empty($user)}}javascript:;{{else /}}{{$navs.url}}{{/if}}">{{$navs.name}}</a>
|
||||||
<a href="{{if ((isset($nav['is_login']) and $nav['is_login'] eq 1) or (isset($navs['is_login']) and $navs['is_login'] eq 1)) and empty($user)}}javascript:;{{else /}}{{$navs.url}}{{/if}}">{{$navs.name}}</a>
|
</li>
|
||||||
</li>
|
{{/foreach}}
|
||||||
{{/foreach}}
|
</ul>
|
||||||
</ul>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{/if}}
|
||||||
{{/if}}
|
{{/foreach}}
|
||||||
{{/foreach}}
|
{{/if}}
|
||||||
|
|
||||||
|
<!-- 公共顶部小导航钩子-右侧后面 -->
|
||||||
|
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
||||||
|
<div class="plugins-tag">
|
||||||
|
<span>plugins_view_header_navigation_top_right_end</span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{if !empty($plugins_view_header_navigation_top_right_end_data) and is_array($plugins_view_header_navigation_top_right_end_data) and (!isset($is_footer) or $is_footer eq 1)}}
|
||||||
|
{{foreach $plugins_view_header_navigation_top_right_end_data as $hook}}
|
||||||
|
{{if is_string($hook) or is_int($hook)}}
|
||||||
|
{{$hook|raw}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,20 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- logo右侧 -->
|
||||||
|
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||||
|
<div class="plugins-tag">
|
||||||
|
<span>plugins_view_common_logo_right</span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{if !empty($plugins_view_common_logo_right_data) and is_array($plugins_view_common_logo_right_data)}}
|
||||||
|
{{foreach $plugins_view_common_search_right_data as $hook}}
|
||||||
|
{{if is_string($hook) or is_int($hook)}}
|
||||||
|
{{$hook|raw}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class="search-bar">
|
<div class="search-bar">
|
||||||
<form action="{{:MyUrl('index/search/index')}}" method="POST">
|
<form action="{{:MyUrl('index/search/index')}}" method="POST">
|
||||||
<div class="search-group">
|
<div class="search-group">
|
||||||
|
|
@ -30,6 +44,20 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 公共搜索框右侧 -->
|
||||||
|
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||||
|
<div class="plugins-tag">
|
||||||
|
<span>plugins_view_common_search_right</span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{if !empty($plugins_view_common_search_right_data) and is_array($plugins_view_common_search_right_data)}}
|
||||||
|
{{foreach $plugins_view_common_search_right_data as $hook}}
|
||||||
|
{{if is_string($hook) or is_int($hook)}}
|
||||||
|
{{$hook|raw}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 搜索框 end -->
|
<!-- 搜索框 end -->
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
全局
|
全局
|
||||||
1. 首页商品支持自定义配置
|
1. 首页商品支持自定义配置
|
||||||
2. 首页左侧二级商品分类支持自定义配置
|
2. 首页左侧二级商品分类支持自定义配置
|
||||||
|
3. 快捷导航新增开关控制
|
||||||
|
|
||||||
web端
|
web端
|
||||||
1. 后台管理小程序列表新增主题管理
|
1. 后台管理小程序列表新增主题管理
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue