开发者

Using Position() in a blog roll to work on every page

Currently I am using the follow开发者_如何学Cing xslt code:

<xsl:if test="position() = 3">
      <div>
        <object data="/frontpage_blogroll_center_top_728x90" type="text/html" width="735" height="95" style="overflow:hidden; width: 738px; height: 100px"><xsl:comment /></object>
      </div>
    </xsl:if>  

I'm using "position() = 3" to position an ad in a blog roll, it works for the first page but not for the subsequent pages. (IE ?page=2 ?page=3 etc) Is there anyway to get it to work for all pages?


  <xsl:if test="position() = 3 + ($numberOfPosts * number($pageNumber - 1))">
    <div>
      <object data="/frontpage_blogroll_center_top_728x90" type="text/html" width="735" height="95" style="overflow:hidden; width: 738px; height: 100px"><xsl:comment /></object>
    </div>  
 </xsl:if>

Just wanted to post the answer

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜