JTBC分页导航样式更改

我就是个世界14年前ASP学习3119
根据客户的要求,需要更改分页导航样式,并在分页导航中精确显示分类文章数据总量,如下例子:

[code]共20632条 当前第1/413页 50/页 首页 上页 下页 尾页 转到:[ ]页 GO[/code]

那就需要更改原先的样式, JTBC[ASP版]这个文件在(ASP)JTBC_CMS_1.0\common\template\tpl_common.jtbc中,最新1.0 Final版在第107行,旧版本在85行:

更改:[separator]
[code]
      <tpl_default><![CDATA[{@firstpage}<span class="ash">{$=itake('global.lng_cutepage.firstpage', 'lng')}</span>{|}<a href="{$URLfirst}">{$=itake('global.lng_cutepage.firstpage', 'lng')}</a>{@firstpage} {@prepage}<span class="ash">{$=itake('global.lng_cutepage.prepage', 'lng')}</span>{|}<a href="{$URLpre}">{$=itake('global.lng_cutepage.prepage', 'lng')}</a>{@prepage} {@nextpage}<span class="ash">{$=itake('global.lng_cutepage.nextpage', 'lng')}</span>{|}<a href="{$URLnext}">{$=itake('global.lng_cutepage.nextpage', 'lng')}</a>{@nextpage} {@lastpage}<span class="ash">{$=itake('global.lng_cutepage.lastpage', 'lng')}</span>{|}<a href="{$URLlast}">{$=itake('global.lng_cutepage.lastpage', 'lng')}</a>{@lastpage} {$=itake('global.lng_cutepage.chpage', 'lng')}<input type="text" style="width: 30px" id="go-page-num" value="{$xpagenum}" maxlength="5" onkeyup="this.value=get_num(this.value);if (this.value>{$pagenums}) this.value={$pagenums};" class="text" /> <input type="button" value="GO" onclick="location_href('{$goURL}');" class="button" /> {$npagenum}/{$pagenums} {$pagesize}{$=itake('global.lng_cutepage.perpage', 'lng')}]]></tpl_default>
[/code]
为:
[code]
      <tpl_default><![CDATA[共<span class="red">{$count}</span>条  当前第<span class="red">{$npagenum}/{$pagenums}</span>页 <span class="red">{$pagesize}</span>{$=itake('global.lng_cutepage.perpage', 'lng')}   {@firstpage}<span class="ash">{$=itake('global.lng_cutepage.firstpage', 'lng')}</span>{|}<a href="{$URLfirst}">{$=itake('global.lng_cutepage.firstpage', 'lng')}</a>{@firstpage} {@prepage}<span class="ash">{$=itake('global.lng_cutepage.prepage', 'lng')}</span>{|}<a href="{$URLpre}">{$=itake('global.lng_cutepage.prepage', 'lng')}</a>{@prepage} {@nextpage}<span class="ash">{$=itake('global.lng_cutepage.nextpage', 'lng')}</span>{|}<a href="{$URLnext}">{$=itake('global.lng_cutepage.nextpage', 'lng')}</a>{@nextpage} {@lastpage}<span class="ash">{$=itake('global.lng_cutepage.lastpage', 'lng')}</span>{|}<a href="{$URLlast}">{$=itake('global.lng_cutepage.lastpage', 'lng')}</a>{@lastpage} {$=itake('global.lng_cutepage.chpage', 'lng')}<input type="text" style="width: 30px" id="go-page-num" value="{$xpagenum}" maxlength="5" onkeyup="this.value=get_num(this.value);if (this.value>{$pagenums}) this.value={$pagenums};" class="text" /> <input type="button" value="GO" onclick="location_href('{$goURL}');" class="button" /> ]]></tpl_default>
[/code]

保存后,删除缓存,刷新看效果.  [color=#FF0000]注意以下两条:[/color]

1. 如果出现如下错误,说明你没有保存为UTF8编码,使用UTF8编码保存即可,当然你也可以使多语言方案来解决,这个文章中不使用中文,也就无所谓编码问题了,直接保存即可.因为我没有用多语言,所以直接把中文写到这里了!
[code]
Microsoft VBScript 运行时错误 错误 '800a01a8'

缺少对象: 'objxml.documentelement'

C:\WWWROOT\ZGSXJJLS\WEB\ARTICLE\../common/incfiles/inc.asp,行 541
[/code]

2. 如果文章总数量不显示,直接显示{$count},说明变量{$count}没有被解析,原因是最新版的文件里去掉了这个变量,你需要手动添加这个变量.

在文件(ASP)JTBC_CMS_1.0\common\incfiles\inc.asp中大约第1357行的位置,

[code]
      tmpstr = replace(tmpstr, "{$goURL}", iurl("li_page", "' + get_id('go-page-num').value + '", nurltype, "folder=" & ncreatefolder & ";filetype=" & ncreatefiletype & ";burls=" & nurl))
[/code]
下面添加如下代码即可:
[code]tmpstr = replace(tmpstr, "{$count}", pagers.recordcount)[/code]

相关文章

动易cms 6.6 格式化时间函数及解决办法

动易签收调用,增加时间,试了N遍,终于成功了[code]<%=FormatDateTime(rsQS("UpdateTime"), 2)%> [/code]格式化时间函...

asp中Response.CacheControl = "no-cache"

asp中对浏览器缓存的设置Response.CacheControl = "no-cache"设置不缓存在临时文件中.本句是指,上网时看到的图片通常在internet的临时文件都能够找到对应的文件,如...

精简版xp安装iis出现HTTP500内部错误以及COM+8004e00f错误的解决办法

精简版xp安装IIS出现HTTP500内部错误以及COM+8004e00f错误的解决办法(MSDTC)出现HTTP500内部错误主要都是IWAM账号在ActiveDirectory、IIS metab...

asp页面中上传文件限制大小解决方案

  asp网页中有上传图片文件框但是上传图片文件大小被限制为[color=#FF0000]100kb[/color],我想改成200kb或不限制,查看源码,顺藤摸瓜,找到[color=#B22222]...

JTBC(ASP版)的模板调用代码手记

[b]首页模板调用代码:[/b][code][b]网站名称[/b] 系统管理-语言管理-模块公用-web_title[b]版权信息[/b]...

JTBC时间格式

[quote][b]JTBC时间格式:[/b]    format_date(date, type)    参数:&nb...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。