📄 显示分类商品一列式列表循环.config
字号:
<root>
<LabelType>列表标签</LabelType>
<LabelImage>../../Admin/Images/LabelIco/GetArticleCustom.gif</LabelImage>
<LabelIntro>
</LabelIntro>
<OutType>sin</OutType>
<CacheTime>0</CacheTime>
<LabelDataType>sql_sysquery</LabelDataType>
<LabelSqlString>SELECT TOP @shownum C.GeneralID,C.NodeID,CP.ProductID,CP.TableName,CP.ProductName,CP.Price_Market,CP.Price,CP.ProductThumb
FROM (PE_CommonModel C INNER JOIN PE_CommonProduct CP ON C.GeneralID=CP.ProductID)
WHERE C.NodeID in (@arraynodeid) AND c.status=99 and C.linkType=0 and CP.EnableSale=1 @producttype @status
Order by @isnew C.UpdateTime DESC</LabelSqlString>
<LabelTemplate>
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
<xsl:output method="html" />
<!-- 定义参数 -->
<xsl:param name="parentid"/>
<xsl:param name="titlelen"/>
<xsl:param name="title"/>
<xsl:param name="type"/>
<xsl:template match="/NewDataSet">
<!-- 子栏目一列式列表循环开始 -->
<div class="c_main_box">
<div class="childclass_title">
<div class="more">
<a>
<xsl:attribute name="href">
<xsl:value-of select="pe:GetNodePath('true',$parentid)"/>
<xsl:if test="$type != ''">
<xsl:text>?type=</xsl:text>
<xsl:value-of select="$type"/>
</xsl:if>
</xsl:attribute> [更多]
</a>
</div>
<a>
<xsl:attribute name="href">
<xsl:value-of select="pe:GetNodePath('true',$parentid)"/>
<xsl:if test="$type != ''">
<xsl:text>&type=</xsl:text>
<xsl:value-of select="$type"/>
</xsl:if>
</xsl:attribute>
<xsl:value-of select="$title" />
</a>
</div>
<div class="class_content">
<!-- 显示内容循环 -->
<div class="p_childclass_list">
<ul>
<xsl:choose>
<xsl:when test="count(Table) = 0">
<li>尚无内容!
</li>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="Table">
<!-- 显示内容 -->
<li>
<div class="p_list_pic">
<a>
<xsl:attribute name="href">
<xsl:value-of select="pe:GetInfoPath(GeneralID)"/>
</xsl:attribute>
<!--显示图片-->
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:choose>
<xsl:when test="string-length(ProductThumb)=0">
<xsl:value-of select="pe:UpLoadDir()"/>nopic.gif
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="pe:ConvertAbsolutePath(ProductThumb)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<!--显示图片结束-->
<xsl:attribute name="border">0
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of disable-output-escaping="yes" select="pe:EncodeText(ProductName,'htmldecode')" />
</xsl:attribute>
</xsl:element>
</a>
</div>
<div class="p_list_name">
<xsl:value-of disable-output-escaping="yes" select="pe:CutText(pe:EncodeText(ProductName,'htmldecode'),$titlelen,'…')" />
</div>
<div class="p_list_price">市场价:¥<xsl:value-of select="format-number(Price_Market,'0.00')"/>
</div>
<div class="p_list_price">零售价:¥<xsl:value-of select="format-number(Price,'0.00')"/>
</div>
<div class="p_list_botton">
<!-- 购买按钮 -->
<a>
<xsl:attribute name="href">
<xsl:value-of select="pe:InstallDir()"/>Shop/ShoppingCart.aspx?Action=AddToCart&ID=<xsl:value-of select="GeneralID" />
</xsl:attribute>
<xsl:element name="img">
<xsl:attribute name="src">
{PE.SiteConfig.ApplicationPath /}Skin/Default/images/ProductBuy.gif
</xsl:attribute>
<xsl:attribute name="border">0
</xsl:attribute>
<xsl:attribute name="alt">购买<xsl:value-of disable-output-escaping="yes" select="pe:CutText(pe:EncodeText(ProductName,'htmldecode'),$titlelen,'…')" />
</xsl:attribute>
</xsl:element>
</a>
<!-- 详细按钮 -->
<a>
<xsl:attribute name="href">
<xsl:value-of select="pe:GetInfoPath(GeneralID)"/>
</xsl:attribute>
<xsl:element name="img">
<xsl:attribute name="src">
{PE.SiteConfig.ApplicationPath /}Skin/Default/images/ProductContent.gif
</xsl:attribute>
<xsl:attribute name="border">0
</xsl:attribute>
<xsl:attribute name="alt">查阅<xsl:value-of disable-output-escaping="yes" select="pe:CutText(pe:EncodeText(ProductName,'htmldecode'),$titlelen,'…')" />详情</xsl:attribute>
</xsl:element>
</a>
</div>
<div class="clearbox">
</div>
</li>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</ul>
<div class="clearbox">
</div>
</div>
</div>
</div>
<!-- 子栏目一列式列表循环结束 -->
</xsl:template>
</xsl:transform>
]]></LabelTemplate>
<attributes>
<name>shownum</name>
<default>10</default>
<intro>显示个数</intro>
</attributes>
<attributes>
<name>arraynodeid</name>
<default>1</default>
<intro>栏目ID</intro>
</attributes>
<attributes>
<name>parentid</name>
<default>0</default>
<intro>父栏目ID</intro>
</attributes>
<attributes>
<name>titlelen</name>
<default>20</default>
<intro>标题字符数</intro>
</attributes>
<attributes>
<name>producttype</name>
<default>and producttype!=4</default>
<intro>商品类型</intro>
</attributes>
<attributes>
<name>status</name>
<default>
</default>
<intro>商品状态</intro>
</attributes>
<attributes>
<name>title</name>
<default>
</default>
<intro>标题</intro>
</attributes>
<attributes>
<name>isnew</name>
<default>
</default>
<intro>新品排序</intro>
</attributes>
<attributes>
<name>type</name>
<default>
</default>
<intro>要显示的商品种类</intro>
</attributes>
</root>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -