Files
ningbo/动易的标签库/标签库/专题类/专题类别下的专题列表.config
T
2026-08-31 16:22:00 +08:00

58 lines
1.7 KiB
XML

<?xml version="1.0"?>
<root>
<LabelType>专题类</LabelType>
<LabelImage>../../Admin/Images/LabelIco/GetArticleCustom.gif</LabelImage>
<LabelIntro>
</LabelIntro>
<OutType>sin</OutType>
<LabelDataType>sql_sysquery</LabelDataType>
<attributes>
<name>specialCategoryId</name>
<default>1</default>
<intro>专题类别ID</intro>
</attributes>
<attributes>
<name>outputQty</name>
<default>20</default>
<intro>显示个数</intro>
</attributes>
<LabelSqlString>SELECT TOP @outputQty * FROM PE_Specials WHERE SpecialCategoryID = @specialCategoryId ORDER BY OrderId ASC</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="titleLength" />
<xsl:template match="/">
<xsl:choose>
<xsl:when test="count(/NewDataSet/Table) = 0">
<font style="color:red">该专题无内容!</font>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="/NewDataSet/Table">
<li>
<a>
<xsl:attribute name="href">
<xsl:value-of select="pe:GetSpecialPath(SpecialID)"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:choose>
<xsl:when test="OpenType=0">_self</xsl:when>
<xsl:otherwise>_blank</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="pe:CutText(SpecialName,$titleLength,'…')"/>
</a>
</li>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
<attributes>
<name>titleLength</name>
<default>20</default>
<intro>最多显示字符个数</intro>
</attributes>
<EnabelAjax>False</EnabelAjax>
<IsXsltSql>false</IsXsltSql>
<IsXsltCountSql>false</IsXsltCountSql>
</root>