aspcms 描述标签长度限制出错,如【list:desc len=10】如果描述有内容时无法限制长度为10个字符,需要修改inc文件夹下AspCms_MainClass.asp文件。
第1723行
if not isnul(rsObj("PageDesc")) then nloopstr = replace(nloopstr,matchfield.value,rsObj("PageDesc")) else infolen = parseArr(fieldArr)("len") : if isNul(infolen) then infolen = 200 else infolen=cint(infolen) nloopstr = replace(nloopstr,matchfield.value,left(filterStr(dropHtml(decodeHtml(rsObj("Content"))),"html"),infolen)) end if
替换为:
if not isnul(rsObj("PageDesc")) then infolen = parseArr(fieldArr)("len") : if isNul(infolen) then infolen = 200 else infolen=cint(infolen) nloopstr = replace(nloopstr,matchfield.value,left(filterStr(decodeHtml(replace(rsObj("PageDesc"),"{aspcms: page}","")),"html"),infolen)) else infolen = parseArr(fieldArr)("len") : if isNul(infolen) then infolen = 200 else infolen=cint(infolen) nloopstr = replace(nloopstr,matchfield.value,left(filterStr(dropHtml(decodeHtml(replace(rsObj("content"),"{aspcms: page}",""))),"html"),infolen)) end if
可以解决描述有内容时[list:desc]字符长度限制。