Files
ningbo/动易的标签库/标签库/留言类/GOV_最新留言列表.config
T
2026-08-31 16:22:00 +08:00

58 lines
1.6 KiB
XML

<?xml version="1.0"?>
<root>
<LabelType>留言类</LabelType>
<LabelIntro>
</LabelIntro>
<OutType>sin</OutType>
<LabelDataType>sql_sysquery</LabelDataType>
<attributes>
<name>shownum</name>
<default>10</default>
<intro>显示个数</intro>
</attributes>
<attributes>
<name>titlelen</name>
<default>20</default>
<intro>标题最多字符数</intro>
</attributes>
<attributes>
<name>ClassID</name>
<default>1</default>
<intro>节点ID</intro>
</attributes>
<LabelSqlString>select top @shownum C.*,T.* from PE_CommonModel C inner join PE_U_GuestBook T on C.ItemID=T.ID where C.NodeID=@ClassID and C.Status=99 order by 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="titlelen"/>
<xsl:param name="ClassID"/>
<xsl:template match="/">
<xsl:choose>
<xsl:when test="count(/NewDataSet/Table)=0">
<ul>
<li>
没有任何留言!
</li>
</ul>
</xsl:when>
<xsl:otherwise>
<ul>
<xsl:for-each select="/NewDataSet/Table">
<li>
<a> <xsl:attribute name="href">
<xsl:value-of select="pe:GetInfoPath(NodeID,GeneralID,InputTime,PinyinTitle,HtmlPageName)"/>
</xsl:attribute>
<xsl:attribute name="target">
_blank
</xsl:attribute>
<xsl:value-of select="pe:CutText(Title,$titlelen,'...')"/>
</a>(<xsl:value-of select="pe:FormatDate(UpdateTime,'yyyy-mm-dd')"/>)
</li>
</xsl:for-each>
</ul>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
</root>