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

74 lines
2.5 KiB
XML

<?xml version="1.0"?>
<root>
<LabelType>问答类</LabelType>
<LabelIntro>待解决问题</LabelIntro>
<OutType>sin</OutType>
<LabelDataType>sql_sysquery</LabelDataType>
<EnabelAjax>False</EnabelAjax>
<attributes>
<name>TopNum</name>
<datatype>sql.int</datatype>
<default>25</default>
<intro>显示项数</intro>
</attributes>
<attributes>
<name>ShowNum</name>
<datatype>sql.int</datatype>
<default>5</default>
<intro>显示行数</intro>
</attributes>
<IsXsltSql>false</IsXsltSql>
<IsXsltCountSql>false</IsXsltCountSql>
<LabelSqlString>SELECT TOP 25 * FROM PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 2 ORDER BY CreateTime 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:template match="/">
<ul>
<xsl:for-each select="NewDataSet/Table">
<li>
<span>
<a>
<xsl:attribute name="href">{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ID=<xsl:value-of select="CategoryID"/>
</xsl:attribute>
[<xsl:value-of select="CategoryName"/>]
</a>
</span>
<span class="answernumber">
{PE.Label id="回答数" QuestionID="<xsl:value-of select="QuestionID"/>"/}
</span>
<em>
<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,$TitleLen,'...')"/>
</a>
</em> |
<a>
<xsl:choose>
<xsl:when test="IsAnonymity = 'false'">
<xsl:value-of select="UserName"/>
</xsl:when>
<xsl:otherwise>匿名</xsl:otherwise>
</xsl:choose>
</a>
</li>
<xsl:if test="(position() mod 5 = 0) and (position() != last())">
<xsl:text disable-output-escaping="yes">&lt;/ul&gt;&lt;ul&gt;</xsl:text>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
<attributes>
<name>TitleLen</name>
<datatype>int</datatype>
<default>30</default>
<intro>标题长度</intro>
</attributes>
</root>