Files
2026-08-31 16:22:00 +08:00

57 lines
1.9 KiB
XML

<?xml version="1.0"?>
<root>
<LabelType>问答类</LabelType>
<LabelIntro>
</LabelIntro>
<OutType>sin</OutType>
<LabelDataType>sql_sysquery</LabelDataType>
<EnabelAjax>False</EnabelAjax>
<attributes>
<name>outputQty</name>
<datatype>supersql</datatype>
<default>8</default>
<intro>显示个数</intro>
</attributes>
<attributes>
<name>splitChar</name>
<datatype>string</datatype>
<default></default>
<intro>分隔符号</intro>
</attributes>
<IsXsltSql>false</IsXsltSql>
<IsXsltCountSql>false</IsXsltCountSql>
<LabelSqlString>SELECT TOP @outputQty Title,QuestionID FROM PE_QA_Question WHERE Status != 0 ORDER BY Hits 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" version="1.0" encoding="UTF-8" indent="no"/>
<xsl:param name="titleLength" />
<xsl:output method="html" />
<xsl:param name="splitChar"/>
<xsl:variable name="countnum" select="count(/NewDataSet/Table)"/>
<xsl:template match="/NewDataSet">
<div class="hotword">
<span class="hotword_l"> </span>
<span class="hotword_r"> </span>
<strong> 热点问答:</strong>
<xsl:for-each select="Table">
<a> <xsl:attribute name="href">{PE.SiteConfig.ApplicationPath/}QA/ShowQuestion.aspx?ID=<xsl:value-of select="QuestionID"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:value-of select="pe:CutText(Title,$titleLength,'')" /> </a>
<xsl:if test="position()&lt;$countnum">
<xsl:value-of select="$splitChar"/>
</xsl:if>
</xsl:for-each>
... </div>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
<attributes>
<name>titleLength</name>
<datatype>supersql</datatype>
<default>16</default>
<intro>项目标题长度,一个汉字占两个字节</intro>
</attributes>
</root>