View Single Post
  #1   IP: 117.95.51.153
Old 2009-08-10, 05:41 PM
topvip topvip is offline
超级版主
 
Join Date: 2006-01-04
Posts: 1206
topvip 正向着好的方向发展
Default 如何在首页加入不同的内容?

比如,在首页多加一组adsense广告代码,可这么操作:

Code:
<if condition="THIS_SCRIPT == 'index'">
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxx";
/* 160x600, vbb */
google_ad_slot = "xxxxxxxxxxxxxxxx";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxx";
/* 160x600, vbb */
google_ad_slot = "xxxxxxxxxxxxxxxx";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

<else />
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxx";
/* 160x600, vbb */
google_ad_slot = "xxxxxxxxxxxxxxxx";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</if>
即可这么写:

Code:
<if condition="THIS_SCRIPT == 'index'">
{banner for index here}
<else />
{banner for all other pages here}
</if>
Reply With Quote