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

40 lines
1.4 KiB
XML

<?xml version="1.0"?>
<root>
<LabelType>问答类</LabelType>
<LabelIntro>显示问题类别</LabelIntro>
<OutType>sin</OutType>
<LabelDataType>sql_sysquery</LabelDataType>
<EnabelAjax>False</EnabelAjax>
<attributes>
<name>CategoryID</name>
<datatype>sql.int</datatype>
<default>0</default>
<intro>问题类别ID</intro>
</attributes>
<IsXsltSql>false</IsXsltSql>
<IsXsltCountSql>false</IsXsltCountSql>
<LabelSqlString>SELECT B.CategoryID AS Level1ID, B.CategoryName AS Level1Name,A.CategoryID AS Level2ID,A.CategoryName AS Level2Name FROM PE_QA_Category A,PE_QA_Category B WHERE A.CategoryID = @CategoryID AND B.CategoryID = A.ParentID</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:template match="/NewDataSet/Table">
-
<a>
<xsl:attribute name="href">
{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ID=<xsl:value-of select="Level1ID"/>
</xsl:attribute>
<xsl:value-of select="Level1Name"/>
</a>
<xsl:if test="Level1ID != Level2ID">
&gt;
<a>
<xsl:attribute name="href">
{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ID=<xsl:value-of select="Level2ID"/>
</xsl:attribute>
<xsl:value-of select="Level2Name"/>
</a>
</xsl:if>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
</root>