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

119 lines
4.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<root>
<LabelDataType>sql_sysquery</LabelDataType>
<LabelType>列表类</LabelType>
<LabelImage>../../Admin/Images/LabelIco/PE_Author.gif</LabelImage>
<LabelIntro>公告列表</LabelIntro>
<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="displayDateTime" />
<xsl:param name="titleLength" />
<xsl:param name="displayAuthor" />
<xsl:param name="contentLength" />
<xsl:param name="contentType" />
<xsl:template match="/NewDataSet/Table">
<ul>
<a>
<xsl:attribute name="href">
<xsl:value-of select="pe:GetInfoPath(NodeID,GeneralID,InputTime,PinyinTitle,HtmlPageName)" />
</xsl:attribute>
<xsl:attribute name="target">
<xsl:choose>
<xsl:when test="pe:GetNodeInfo(NodeID, 'ItemOpenType') = 0">_self</xsl:when>
<xsl:otherwise>_blank</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<li class="announce_title">
<xsl:value-of select="pe:CutText(pe:RemoveHtml(Title),$titleLength,'…')" />
</li>
<xsl:if test="$contentLength != 0">
<li class="announce_text">
<xsl:value-of disable-output-escaping="yes" select="pe:CutText(pe:RemoveHtml(Content),$contentLength,'…')" />
</li>
</xsl:if>
<xsl:if test="$displayAuthor = 'true'">
<li class="announce_author">
<xsl:value-of select="Author"/>
</li>
</xsl:if>
<xsl:if test="$displayDateTime != ''">
<li class="announce_author">
[<xsl:value-of select="pe:FormatDate(UpdateTime, $displayDateTime)" />]
</li>
</xsl:if>
</a>
</ul>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
<attributes>
<name>outputQty</name>
<datatype>supersql</datatype>
<default>10</default>
<intro>列表数量</intro>
</attributes>
<attributes>
<name>titleLength</name>
<datatype>int</datatype>
<default>40</default>
<intro>标题长度</intro>
</attributes>
<attributes>
<name>contentLength</name>
<datatype>string</datatype>
<default>0</default>
<intro>是否显示内容,为0时则不显示内容</intro>
</attributes>
<attributes>
<name>displayAuthor</name>
<datatype>bool</datatype>
<default>true</default>
<intro>是否显示发布者</intro>
</attributes>
<attributes>
<name>displayDateTime</name>
<datatype>string</datatype>
<default />
<intro>是否显示日期,为空则不显示</intro>
</attributes>
<LabelSqlString>
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="outputQty"/>
<xsl:param name="outputType"/>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<root>
<sql>
SELECT TOP <xsl:value-of select="$outputQty"/> *
FROM PE_U_Announce UT
INNER JOIN PE_CommonModel CM ON ( UT.ID = CM.GeneralID )
WHERE CM.Status = 99
AND UT.IsSelected = 1
AND ( DATEADD(d, UT.OutTime, UT.DateAndTime) >= GETDATE() OR UT.OutTime = 0 )
<xsl:choose>
<xsl:when test="$outputType = 1">
AND UT.ShowType IN ('弹出','全部')
</xsl:when>
<xsl:when test="$outputType = 2">
AND UT.ShowType IN ('滚动','全部')
</xsl:when>
</xsl:choose>
ORDER BY UT.DateAndTime DESC
</sql>
</root>
</xsl:template>
</xsl:stylesheet>]]></LabelSqlString>
<OutType>sin</OutType>
<CacheTime>12</CacheTime>
<EnabelAjax>False</EnabelAjax>
<IsXsltSql>true</IsXsltSql>
<IsXsltCountSql>false</IsXsltCountSql>
<Version officialVersion="" modifiedVersions="3001" compatibleVersion="" />
<attributes>
<name>outputType</name>
<datatype>int</datatype>
<default>0</default>
<intro>输出类型:1为弹出;2为滚动;0为全部</intro>
</attributes>
</root>