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]字符長度限制。