LeadWit CMS解决悬挂提示窗口标题显示完整内容
查看全部词条命名空间:Main
导航:返回上一页
LeadWit CMS解决悬挂提示窗口标题显示完整内容
其中标签内容的长度在显示标签控制,不是在调用标签控制,这样可以方便在不同的地方输出不同内容的长度,就象以前悬挂提示窗口的标题,以前有人提到这个问题,我就这样解决:
1、修改LZ_class.asp文件中:Public Function GetTemplateContentToCaChe(Para)中的内容在
Select Case StrComp(ParLable(ii),ParaArray(ii))
Case 0
blockTmp2(i) = Replace(blockTmp2(i),"{$"& ParaArray(ii) &"}",
ChkIsNull(formatDate(Dr(ii,i),2)))
Case Else
blockTmp2(i) = Replace(blockTmp2(i),"{$"& ParaArray(ii) &"}",
ChkIsNull(formatDate(GotTopic(replacehtml(Dr(ii,i)),
Cint(ShowLenTitle(ParLable(ii)))),2)))
End Select的后面加上以下:
dim pos1,pos2,len1,TempStr'增加显示标签中有显示长度的输出,{Title(30),Title(50)},
不需要在调用标签上有长度
'【Lable:ArticleID,ClassID,Title,AuthorName,UpdateTime,Hits】·{$Title(40)}</a>
do
Pos1=Instr(blockTmp2(i),"{$"&ParaArray(ii)&"(")
Pos2=Instr(blockTmp2(i),")}")
If Pos1 > 0 And Pos2> 0 Then
TempStr = Mid(blockTmp2(i),Pos1,Pos2+2-Pos1)
blockTmp2(i) = Replace(blockTmp2(i),tempstr,"{$"& ParaArray(ii) &"}")
blockTmp2(i) = Replace(blockTmp2(i),
"{$"& ParaArray(ii) &"}",
ChkIsNull(formatDate(GotTopic(replacehtml(Dr(ii,i)),
Cint(ShowLenTitle(Tempstr))),2)))
else
exit do
End If
Loop'增加功能结束
- 修改ReplaceTemplate.asp文件,Function GetContent(ParStr)中选择语句中加入:case else
GetContent = "{$"&ParaArray(0)&"("&ParaArray(1)&")}"
- 上传此二个文件。
- 修改模板内容,在修改的地方如[label Title(40)中(40)可以不要,在需要调用的地方改为{$Title(40)}或其它{$Title(50)}
如下
【Template】
【From:LZ8_Article,4,True】
【Lable:ArticleID,ClassID,Title,AuthorName,UpdateTime,Hits,Content】
【Where:True,0,0,0,ArticleID,UpdateTime,Desc】
【List:8,0】
[<a href="{$WebPath}/news/Class.asp?ClassID={$ClassID}">{$ClassName}</a>]<a
href="{$WebPath}/News/List.asp?SelectId={$ArticleID}&ClassId={$ClassID} title='新闻标题:
{$Title}<br>作者:<font color=blue>{$AuthorName}</font><br>更新时间:
<font color=green>{$UpdateTime}</font><br>浏次数:
<font color=red>{$Hits}</font><br>内容简介:
{$(Content(100)}'">·{$Title(38)}</a>{$NewGif}
<font color=green>({$UpdateTime})</font><br>
【/Template】
这样可以多个地方调用一个字段,另外也比较直观吧!