头条图片显示列表.config

来自「动易SiteFactory网上商店系统正式版动易SiteFactory网上商店系」· CONFIG 代码 · 共 73 行

CONFIG
73
字号
<root>
  <LabelType>列表标签</LabelType>
  <LabelImage>../../Admin/Images/LabelIco/GetArticleCustom.gif</LabelImage>
  <LabelIntro>第一条自动显示为图片</LabelIntro>
  <LabelDataType>sql_sysquery</LabelDataType>
  <UsePage>
  </UsePage>
  <LabelSqlString>SELECT TOP @listnum GeneralID,NodeID,TableName,Title,Inputer,Hits,UpdateTime,Status  FROM PE_CommonModel  WHERE  (Status = 99)  ORDER BY 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:param name="useimg" />
<xsl:param name="titlelen" />
<xsl:output method="html" />
<xsl:template match="/NewDataSet/Table">
<xsl:choose>
<xsl:when test="position() = 1">
    <xsl:choose>
    <xsl:when test="$useimg = 'true'">
        <a>
        <xsl:attribute name="href">
        <xsl:value-of select="pe:GetInfoPath(GeneralID)"/>
        </xsl:attribute>
        <img src="{pe:Txt2Img(pe:EncodeText(Title,'htmldecode'),'黑体;100;1;true','40;400;10;10','220;255;0;0','Skin/Title/txtbg.jpg','true','Skin/Title/list1.jpg',1)}" border="0" />
        </a>
    </xsl:when>
    <xsl:otherwise>
        <li>
        <a>
        <xsl:attribute name="href">
        <xsl:value-of select="pe:GetInfoPath(GeneralID)"/>
        </xsl:attribute>
        <xsl:value-of select="pe:CutText(pe:EncodeText(Title,'htmldecode'),$titlelen,'…')"/>
        </a>
        </li>
    </xsl:otherwise>
    </xsl:choose>
</xsl:when>
<xsl:otherwise>
    <li>
    <a>
    <xsl:attribute name="href">
    <xsl:value-of select="pe:GetInfoPath(GeneralID)"/>
    </xsl:attribute>
    <xsl:value-of select="pe:CutText(pe:EncodeText(Title,'htmldecode'),$titlelen,'…')"/>
    </a>
    </li>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
  <LabelSqlCount>select count(id) from database</LabelSqlCount>
  <attributes>
    <name>listnum</name>
    <default>10</default>
    <intro>列表数量</intro>
  </attributes>
  <OutType>sin</OutType>
  <attributes>
    <name>useimg</name>
    <default>false</default>
    <intro>头条是否显示为图片</intro>
  </attributes>
  <CacheTime>60</CacheTime>
  <attributes>
    <name>titlelen</name>
    <default>40</default>
    <intro>标题长度</intro>
  </attributes>
</root>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?