header_top_nav.html 7.7 KB
Newer Older
D
v1.2.0  
devil_gong 已提交
1 2 3 4 5 6
<!-- 顶部导航条 start -->
<div class="header-top">
    <div class="am-container header">
        <ul class="top-nav-left">
            <div class="top-nav-items">
                <div class="menu-hd">
D
Devil 已提交
7 8 9 10 11 12 13 14 15 16 17 18 19 20
                    <!-- 公共顶部小导航钩子-左侧前面 -->
                    {{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}}

D
v1.2.0  
devil_gong 已提交
21
                    {{if empty($user)}}
D
devil_gong 已提交
22 23
                        <em>您好,欢迎来到</em>
                        <em>{{:MyC('home_site_name')}}</em>
24
                        {{if !empty($home_user_login_type)}}
D
v1.2.0  
devil_gong 已提交
25 26
                            [<a href="{{:MyUrl('index/user/logininfo')}}">登录</a>]
                        {{/if}}
27
                        {{if !empty($home_user_reg_type)}}
D
v1.2.0  
devil_gong 已提交
28 29 30
                            [<a href="{{:MyUrl('index/user/regInfo')}}">注册</a>]
                        {{/if}}
                    {{else /}}
D
devil_gong 已提交
31 32 33 34 35 36
                        <em>您好</em>
                        {{if !empty($user['icon'])}}
                            <img src="{{$user.icon}}" class="common-user-icon" {{if !empty($user['icon_title'])}}title="{{$user.icon_title}}"{{/if}} />
                        {{/if}}
                        <em>{{$user.user_name_view}},欢迎来到</em>
                        <em>{{:MyC('home_site_name')}}</em>
D
v1.2.0  
devil_gong 已提交
37 38 39
                        [<a href="{{:MyUrl('index/user/logout')}}">退出</a>]
                    {{/if}}

D
Devil 已提交
40
                    <!-- 公共顶部小导航钩子-左侧后面 -->
D
devil_gong 已提交
41 42
                    {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                        <div class="plugins-tag">
D
Devil 已提交
43
                            <span>plugins_view_header_navigation_top_left_end</span>
D
devil_gong 已提交
44 45
                        </div>
                    {{/if}}
D
Devil 已提交
46 47
                    {{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_end_data as $hook}}
D
devil_gong 已提交
48 49 50 51
                            {{if is_string($hook) or is_int($hook)}}
                                {{$hook|raw}}
                            {{/if}}
                        {{/foreach}}
D
v1.2.0  
devil_gong 已提交
52 53 54
                    {{/if}}
                </div>
            </div>
D
devil_gong 已提交
55
        </ul>
D
Devil 已提交
56

D
devil_gong 已提交
57
        <ul class="top-nav-right">
D
Devil 已提交
58 59 60 61 62 63 64 65 66 67 68 69 70 71
            <!-- 公共顶部小导航钩子-右侧前面 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_header_navigation_top_right_begin</span>
                </div>
            {{/if}}
            {{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)}}
                {{foreach $plugins_view_header_navigation_top_right_begin_data as $hook}}
                    {{if is_string($hook) or is_int($hook)}}
                        {{$hook|raw}}
                    {{/if}}
                {{/foreach}}
            {{/if}}

D
Devil 已提交
72 73 74 75 76 77 78 79 80 81 82 83
            <!-- 非首页则展示首页入口 -->
            {{if MyC('home_header_top_is_home', 0) eq 1 and $module_name.$controller_name.$action_name neq 'indexindexindex'}}
                <div class="top-nav-items">
                    <div class="menu-hd ">
                        <a href="{{$Think.__MY_URL__}}" target="_top">
                            <i class="am-icon-fw am-icon-home"></i>
                            <span>商城首页</span>
                        </a>
                    </div>
                </div>
            {{/if}}

D
Devil 已提交
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
            <!-- 右侧导航 -->
            {{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}}
D
devil_gong 已提交
99
                                    {{/if}}
D
Devil 已提交
100 101
                                </a>
                            </div>
D
devil_gong 已提交
102
                        </div>
D
Devil 已提交
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
                    {{else /}}
                        <div class="top-nav-items">
                            <div class="am-dropdown menu-hd" data-am-dropdown>
                                <a class="am-dropdown-toggle" href="javascript:;" target="_top" data-am-dropdown-toggle>
                                    <i class="am-icon-fw {{$nav.icon}}"></i>
                                    <span>{{$nav.name}}</span>
                                    <i class="am-icon-angle-down"></i>
                                </a>
                                <ul class="am-dropdown-content">
                                    {{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}}">
                                            <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>
                                    {{/foreach}}
                                </ul>
                            </div>
D
devil_gong 已提交
119
                        </div>
D
Devil 已提交
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
                    {{/if}}
                {{/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}}
D
v1.2.0  
devil_gong 已提交
137 138 139
        </ul>
    </div>
</div>
D
devil_gong 已提交
140
<!-- 顶部导航条 end