xml MTP Dyamic Ready主题导航设置(按类别)/侧边栏和“最受欢迎”部分。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml MTP Dyamic Ready主题导航设置(按类别)/侧边栏和“最受欢迎”部分。相关的知识,希望对你有一定的参考价值。

<mvt:comment>
| Check for Readytheme Navigation Item cs_CATEGORYCODE
| If it's empty, pull regular subcategories.
| Level 1 is a "title", level 2 is links. per Debbie's' request
</mvt:comment>

<nav class="bottom-shadow category-tree">
	<h5><mvt:if expr="l.settings:page:code EQ 'SEARCH'">Filter Your Results<mvt:else>&mvt:category:name;</mvt:if></h5>
	<div class="add-double-dots"></div>
	<div class="searchspring-facets_container zoom-anim-dialog" id="ss_wrap">

	<mvt:assign name="l.settings:readytheme:navigationitems" value="''" />
	<mvt:assign name="g.readythemename" value="'cs_' $ l.settings:category:code" />
	<mvt:item name="readytheme" param="navigationset( g.readythemename )" />

	<mvt:if expr="ISNULL l.settings:readytheme:navigationitems">
		<mvt:item name="toolkit" param="subcat|ccount|g.Category_Code" />
		<mvt:if expr="ccount GT 0">
			<div class="facet_title">Category</div>
			<ul>
				<mvt:foreach iterator="sub_category" array="sub_categories">
					<li class="level-1"><a href="/category/&mvt:sub_category:code;.html">&mvt:sub_category:name;</a></li>
				</mvt:foreach>
			</ul>
		</mvt:if>
	</mvt:if>
	</div>
</nav>
<!-- end category-tree -->
<mvt:comment>
| Check mp_CATEGORYCODE Readytheme Navigation Set
| If empty, checks cs_CATEGORYCODE Readytheme Navigation Set
| Will loop down two subcategory's products to find an image.
</mvt:comment>

<mvt:assign name="l.settings:readytheme:navigationitems" value="''" />
<mvt:assign name="g.readythemename" value="'mp_' $ l.settings:category:code" />
<div class="hide" style="display:none;">
	<mvt:item name="readytheme" param="navigationset( g.readythemename )" />
</div>

<mvt:if expr="l.settings:readytheme:navigationitems">
	<mvt:comment> === START Most Popular === </mvt:comment>
	<div class="row bg-white main-content-row sub-category-layout">
		<div class="column whole align-center">
			<div class="add-double-dots"><span class="inner"><span class="uppercase most-inner">Most Popular</span></span></div>
		</div>
		<div class="column whole popular-subcats">

			<mvt:foreach iterator="navigationitem" array="readytheme:navigationitems">
				<div class="column half medium-one-third sub-category">
					<mvt:item name="toolkit" param="catimage|smallimage|l.all_settings:navigationitem:link_dest" />
					<a href="/category/&mvt:navigationitem:link_dest;.html">
						<div class="cat-title">&mvt:navigationitem:name;</div>
						<div class="catimg-wrap">
							<mvt:if expr="g.smallimage">
								<img src="&mvt:global:smallimage;" alt="&mvt:navigationitem:name;" title="&mvt:navigationitem:name;" />
							<mvt:else>
								<mvt:comment> === Check for first Product's Image === </mvt:comment>
								<mvt:item name="toolkit" param="cxpc|pcount|l.all_settings:navigationitem:link_dest" />
								<mvt:if expr="l.settings:sub_products[1]:thumbnail">
									<img src="&mvt:sub_products[1]:thumbnail" alt="&mvt:navigationitem:name;" title="&mvt:navigationitem:name;" />
								<mvt:else>
									<mvt:comment> === Check for first subcategory's first Product === </mvt:comment>
									<mvt:item name="toolkit" param="subcat2|ccount2|l.all_settings:navigationitem:link_dest" />
									<mvt:if expr="ccount2 GT 0">
										<mvt:item name="toolkit" param="cxpc|pcount|l.all_settings:sub_categories2[1]:code" />
										<mvt:if expr="l.settings:sub_products[1]:thumbnail">
											<img src="&mvt:sub_products[1]:thumbnail" alt="&mvt:navigationitem:name;" title="&mvt:navigationitem:name;" />
										<mvt:else>
											<img src="../images/img_no_thumb.jpg" alt="&mvt:navigationitem:name;" title="&mvt:navigationitem:name;" />
										</mvt:if>
									<mvt:else>
										<img src="../images/img_no_thumb.jpg" alt="&mvt:navigationitem:name;" title="&mvt:navigationitem:name;" />
									</mvt:if>
								</mvt:if>
							</mvt:if>
						</div>
						<div class="cat-view-all uppercase">View All</div>
					</a>
				</div>
			</mvt:foreach>

		</div>
	</div>
	<mvt:comment> === END Most Popular === </mvt:comment>
	<mvt:assign name="l.settings:hideprods" value="1" />
<mvt:else>
	<mvt:comment> === START Category Sidebar === </mvt:comment>
		<mvt:assign name="l.settings:readytheme:navigationitems" value="''" />
		<mvt:assign name="g.readythemename" value="'cs_' $ l.settings:category:code" />
		<div class="hide" style="display:none;">
			<mvt:item name="readytheme" param="navigationset( g.readythemename )" />
		</div>
		<mvt:if expr="l.settings:readytheme:navigationitems">
			<div class="row bg-white main-content-row sub-category-layout">
			<div class="column whole align-center">
				<div class="add-double-dots"><span class="inner"><span class="uppercase most-inner">Most Popular</span></span></div>
			</div>
			<div class="column whole popular-subcats">
				<mvt:assign name="l.cscounter" value="0" />
				<mvt:foreach iterator="navigationitem" array="readytheme:navigationitems">
				<mvt:assign name="l.cscounter" value="l.cscounter + 1" />
					<mvt:if expr="l.cscounter LE 6">
						<div class="column half medium-one-third sub-category">
							<mvt:item name="toolkit" param="catimage|smallimage|l.all_settings:navigationitem:link_dest" />
							<a href="/category/&mvt:navigationitem:link_dest;.html">
								<div class="cat-title">&mvt:navigationitem:name;</div>
								<div class="catimg-wrap">
									<mvt:if expr="g.smallimage">
										<img src="&mvt:global:smallimage;" alt="&mvt:navigationitem:name;" title="&mvt:navigationitem:name;" />
									<mvt:else>
										<mvt:comment> === Check for first Product's Image === </mvt:comment>
										<mvt:item name="toolkit" param="cxpc|pcount|l.all_settings:navigationitem:link_dest" />
										<mvt:if expr="l.settings:sub_products[1]:thumbnail">
											<img src="&mvt:sub_products[1]:thumbnail" alt="&mvt:navigationitem:name;" title="&mvt:navigationitem:name;" />
										<mvt:else>
											<mvt:comment> === Check for first subcategory's first Product === </mvt:comment>
											<mvt:item name="toolkit" param="subcat2|ccount2|l.all_settings:navigationitem:link_dest" />
											<mvt:if expr="ccount2 GT 0">
												<mvt:item name="toolkit" param="cxpc|pcount|l.all_settings:sub_categories2[1]:code" />
												<mvt:if expr="l.settings:sub_products[1]:thumbnail">
													<img src="&mvt:sub_products[1]:thumbnail" alt="&mvt:navigationitem:name;" title="&mvt:navigationitem:name;" />
												<mvt:else>
													<img src="../images/img_no_thumb.jpg" alt="&mvt:navigationitem:name;" title="&mvt:navigationitem:name;" />
												</mvt:if>
											<mvt:else>
												<img src="../images/img_no_thumb.jpg" alt="&mvt:navigationitem:name;" title="&mvt:navigationitem:name;" />
											</mvt:if>
										</mvt:if>
									</mvt:if>
								</div>
								<div class="cat-view-all uppercase">View All</div>
							</a>
						</div>
					<mvt:else>
						<mvt:foreachstop />
					</mvt:if>
				</mvt:foreach>

			</div>
		</div>
		<mvt:assign name="l.settings:hideprods" value="1" />
	</mvt:if>
	<mvt:comment> === END Category Sidebar === </mvt:comment>
</mvt:if>

以上是关于xml MTP Dyamic Ready主题导航设置(按类别)/侧边栏和“最受欢迎”部分。的主要内容,如果未能解决你的问题,请参考以下文章

xml 莲花准备主题顶部导航

xml 莲花准备主题顶部导航

Wordpress网址导航主题:HaoWa1.3.1

Nexus 4 未通过 MTP 显示文件

Android 应用中 v21 的导航栏和状态栏颜色(无主题库)

导航栏的使用(ToolBarBottomNavgationView)