問(wèn)題:如何在新窗口打開(kāi)點(diǎn)擊圖片
解決方法:修改顯示圖片的標(biāo)簽,給<a>增加一條在新窗口打開(kāi)的屬性_blank。
以默認(rèn)商城首頁(yè)“最新商品”為例,查模板,找到調(diào)用的標(biāo)簽是
{PE.Label id="最新商品子欄目一列式列表循環(huán)" shownum="8" parentid="@RequestInt_id" /}
標(biāo)簽管理中,查找“最新商品子欄目一列式列表循環(huán)”找到
{PE.Label id="顯示分類商品一列式列表循環(huán)" parentid="<xsl:value-of select="$parentid" />" shownum="<xsl:value-of select="$shownum" />" title="最新商品" titlelen="<xsl:value-of select="$titlelen" />" arraynodeid="<xsl:value-of select="arrchildid"/>" isnew="convert(int,isnew) desc," /}
查找“顯示分類商品一列式列表循環(huán)”,修改其內(nèi)容
<a>
<xsl:attribute name="href">
<xsl:value-of disable-output-escaping="yes" select="pe:GetInfoPath(NodeID,GeneralID,InputTime,PinyinTitle)"/>
</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<!--顯示圖片-->
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:choose>
<xsl:when test="string-length(ProductThumb)=0">
<xsl:value-of select="pe:UpLoadDir()"/>nopic.gif
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="pe:ConvertAbsolutePath(ProductThumb)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<!--顯示圖片結(jié)束-->
添加紅色的代碼,即可。
說(shuō)明:
1、上面的方法也就是給<a>增加一條在新窗口打開(kāi)的屬性target=_blank
2、其它鏈接也可以類似這樣修改。
|
新聞熱點(diǎn)
疑難解答
圖片精選