打开网站首页时怎么让地址栏上不显示出网页的扩展名-动易CMS教程

来源:模板无忧 作者:动易网络 更新时间:2008-02-15 点击:

  默认情况下,动易的标签 {$ShowChannel} 输出时,网站首页、频道首页的地址都是{$InstallDir}index.htm、{$InstallDir}Article/index.asp 的形式,如何才能修改为 {$InstallDir}、{$InstallDir}Article/ 的形式呢?

   通过查看文件,可以发现只需修改 Include/PowerEasy.Common.Front.asp 中的Function GetChannelList(NumNewLine),进而改变标签 {$ShowChannel} 的输出即可。
  下面以动易开源版SiteWeaver™ CMS 6.5为例进行说明。


第一步,将网站首页地址由 {$InstallDir}index.htm 的形式修改为 {$InstallDir} 的形式。
  
在 Include/PowerEasy.Common.Front.asp 中找到如下代码:

If ChannelID = 0 Then
strChannel = ChannelLink & \"<a class='Channel2' href='\" & strInstallDir & FileName_SiteIndex & \"'>\" & XmlText(\"BaseText\", \"FirstPage\", \"网站首页\") & \"</a>\" & ChannelLink
Else
strChannel = ChannelLink & \"<a class='Channel' href='\" & strInstallDir & FileName_SiteIndex & \"'>\" & XmlText(\"BaseText\", \"FirstPage\", \"网站首页\") & \"</a>\" & ChannelLink
End If



将其修改为

If ChannelID = 0 Then
strChannel = ChannelLink & \"<a class='Channel2' href='\" & strInstallDir & \"'>\" & XmlText(\"BaseText\", \"FirstPage\", \"网站首页\") & \"</a>\" & ChannelLink
Else
strChannel = ChannelLink & \"<a class='Channel' href='\" & strInstallDir & \"'>\" & XmlText(\"BaseText\", \"FirstPage\", \"网站首页\") & \"</a>\" & ChannelLink
End If
第二步,将频道首页地址由 {$InstallDir}Article/index.htm 的形式修改为 {$InstallDir}Article/ 的形式。在 Include/PowerEasy.Common.Front.asp 中找到如下代码:
If rsChannel(\"UseCreateHTML\") > 0 Then
strChannel = strChannel & \" href='\" & ChannelUrl & \"/Index\" & arrFileExt(rsChannel(\"FileExt_Index\")) & \"'\"
Else
strChannel = strChannel & \" href='\" & ChannelUrl & \"/Index.asp'\"
End If


将其修改为

If rsChannel(\"UseCreateHTML\") > 0 Then
strChannel = strChannel & \" href='\" & ChannelUrl & \"/'\"
Else
strChannel = strChannel & \" href='\" & ChannelUrl & \"/'\"
End If
< Prev12 Next >
相关动易CMS教程:
最新评论:
loading.. 评论加载中....
发表评论:不能超过250字节,请自觉遵守互联网相关政策法规.
  • 昵称: 验证: