主题 : 我在生成静态化栏目时,出现了channel 的bug 是${function}的js错误,跪求答案 |
级别: 解元
|
12# 发表于:2017-08-23 09:35:17 IP:123.121.*.*
回复第11楼 版主也就是说,如果栏目里报错的行里有content 就把这行给删了。这样会不会影响最后的显示效果?
|
||
---|---|---|---|
级别: 解元
|
14# 发表于:2017-08-23 09:44:05 IP:123.121.*.*
回复第13楼
该文件的源代码如下,我怕老问您问题,您就帮我标出来哪些需要删除的,用个红框子帮我框出来,我就删了它。主要是文件太长,我对您贵公司的标签不是特别了解,您看看吧 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="x-ua-compatible" content="ie=7" /> <title>${channel.title!channel.name} - ${site.name}</title> <meta http-equiv="keywords" content="${channel.keywords!}"/> <meta http-equiv="description" content="${channel.description!}"/> <link href="/${res}/css/layout.css" type="text/css" rel="stylesheet" /> <link href="/${res}/css/shuichan.css" rel="stylesheet" type="text/css" /> <link href="/${res}/css/gongyong_shuichan.css" rel="stylesheet" type="text/css" /> <link href="${resSys}/front.css" rel="stylesheet" type="text/css"/> <script src="${resSys}/jquery.js" type="text/javascript"></script> <script src="${resSys}/front.js" type="text/javascript"></script> <script src="/${res}/js/common.js" type="text/javascript"></script> <script src="/${res}/js/html5shiv.min.js"></script> <script src="/${res}/js/respond.min.js"></script> <![endif]--> <script type="text/javascript"> $(function() { Cms.channelViewCount("${base}","${channel.id}"); }); </script> </head> <body class="body"> <div class="sc_layout"> [#include "../include/页头顶栏_水产.html"/] <!--banner_begin--> <div class="sc_banner"></div> <!--banner_end--> <!--nav_begin--> [#include "../include/页头导航栏_水产.html"/] <!--nav_end--> <div class="clear-10"></div> <div class="jiabt"> <img src="../../${res}/img/jia_nei_06.jpg" /> <ul> <li style="background:none; padding-left:10px;"><a href="http://shuichan.sdnx.co/">首页</a></li> <li>[#list channel.nodeList as n][#if n.parent??][#else]<a href="${n.url}">${n.name}</a>[/#if][#if n_has_next] [/#if][/#list]</li> <li>[#list channel.nodeList as n][#if n.parent??]<a href="${n.url}">${n.name}</a>[/#if][#if n_has_next] [/#if][/#list]</li> </ul> </div> <div id="main"> <div class="clear-10"></div> <!--cjbd_begin--> <div class="page4 box"> <div class="w720 sfl"> <div class="rb_mid box"> <div class="w96"> <div class="msgbar">发布时间: ${content.releaseDate} 作者:${content.author!'本站编辑'} 来源: <a target="_blank" href="${content.originUrl!}">${content.origin!'本站原创'}</a> [#if user??] <script type="text/javascript"> $(function() { Cms.collectexist("${base}","${content.id}","cancelSpan","comfirmSpan"); }); </script> [/#if] </div> [#if pagination.firstPage] [#if content.description??] <div class="summary"><span style="color:#ff0000; font-weight:bold;">摘要:</span> [@text_cut s=content.description len='100' append='...'/]</div> [/#if] [/#if] [#if content.mediaPath?? && content.mediaType??] <p style="margin: 5px auto; text-align: center">[#if content.mediaType=='FLV'] <object height="300" width="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param name="movie" value="/${res}/img/flvplayer.swf" /> <param name="quality" value="high" /> <param name="allowFullScreen" value="true" /> <param name="FlashVars" value="vcastr_file=${content.mediaPath!}&BufferTime=3" /><embed height="300" width="400" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" flashvars="vcastr_file=${content.mediaPath!}" allowfullscreen="true" src="/${res}/img/flvplayer.swf"></embed></object>[#elseif content.mediaType=='FLASH'] <embed height="300" width="400" type="application/x-shockwave-flash" quality="high" src="${content.mediaPath}" wmode="transparent" align="center"></embed>[#else] <embed height="300" width="400" type="video/x-ms-wmv" src="${content.mediaPath}" console="cons" controls="ImageWindow" autostart="true"></embed>[/#if]</p> [/#if] <div class="content">${txt!}</div> <div class="pagebar">[#include "../style_page/content.html"/]</div> <div class="other box">[#if channel.allowUpdown] [/#if] <ul> <li style="float:left; width:100%;"><strong>上一篇:</strong>[@cms_content id=content.id next='1' channelId=channel.id][#if tag_bean??]<a href="${tag_bean.url}">${tag_bean.title}</a>[#else]没有了[/#if][/@cms_content]</li> <li style="float:left; width:100%;" ><strong>下一篇:</strong>[@cms_content id=content.id next='0' channelId=channel.id][#if tag_bean??]<a href="${tag_bean.url}">${tag_bean.title}</a>[#else]没有了[/#if][/@cms_content]</li> </ul> </div> </div> <!--网友评论_Begin--> [#if channel.commentControl!=2] [#include "inc_comment_list.html"/] <div class="comment"> <h2>网友评论 已有 <span style="color:#F00;">${content.comments}</span> 条评论,<a href="http://shuichan.sdnx.co/comment.jspx?contentId=${content.id}" target="_blank">查看更多评论>></a> </h2> [#if content.channel.commentControl==0 || (content.channel.commentControl==1 && user??)] <div class="w98" style="margin-top:5px;"> <form id="commentForm" action="http://shuichan.sdnx.co/comment.jspx" method="post"> <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#EAEAEA"> <tr> <td width="19%" height="80" align="right" bgcolor="#FaFaFa"> <strong>评论内容:</strong> </td> <td width="81%" bgcolor="#FFFFFF"> <textarea name="text" class="cinput" cols="60" rows="5"></textarea> </td> </tr> <tr> <td width="19%" align="right" bgcolor="#FaFaFa"><strong>验证码:</strong></td> <td width="81%" bgcolor="#FFFFFF"> <input name="captcha" type="text" id="captcha" vld="{required:true}" class="input"/> <img src="http://shuichan.sdnx.co/captcha.svl" onclick="this.shttp://shuichan.sdnx.co/com/captcha.svl?d='+new Date()"/> </td> </tr> <tr> <td height="30" colspan="2" align="center" bgcolor="#FFFFFF"> <input type="hidden" name="contentId" value="${content.id}"/> <input type="submit" name="Submit" value=" 马上发表 " /> 【网友评论仅供其表达个人看法,并不表明本站同意其观点或证实其描述。】 </td> </tr> </table> </form> <script type="text/javascript"> $(function() { /* $("#commentForm").validate( { submitHandler : function(form) { $(form).ajaxSubmit( { "success" : function(data) { if(data.success) { alert("评论成功"); location.href=location.href; } else { alert("评论失败"); } }, "dataType" : "json" }); } }); */ Cms.comment(function(data) { if(data.status==0) { alert("评论成功"); location.href=location.href; } else if(data.status==1) { alert("验证码错误"); $("#commentCaptcha").click(); } else if(data.status==2) { alert("内容不存在"); $("#commentCaptcha").click(); } else if(data.status==3) { alert("评论关闭"); $("#commentCaptcha").click(); } else if(data.status==4) { alert("需要登录评论"); $("#commentCaptcha").click(); } else if(data.status==100) { alert("内容不存在"); $("#commentCaptcha").click(); } else if(data.status==101) { alert("评论不能为空"); $("#commentCaptcha").click(); } else { alert("评论失败"); $("#commentCaptcha").click(); } }); }); </script> </div> [#elseif channel.commentControl==1 && !user??] [#--登录评论,且未登录--] <div style="width:96%;font-size:14px;color:red;margin:10px;"> 您尚未登录,请登录后发布评论! 【<a href="http://shuichan.sdnx.co/login.jspx?returnUrl=/">马上登录</a>】 </div> [#else] [#--不允许评论--] [/#if] </div> [/#if] <!--网友评论_End--> </div> <div class="rb_low"> </div> </div> <div class=" w220 sfr"> <div class="jbj"> <h1>图文排行</h1> </div> <div class="kuang tuwen"> [@cms_content_list typeId='3' styleList='3-1' titLen='20' count='5' flashWidth='242' flashHeight='200' textHeight='0' channelOption='1' tpl='2' channelId='11'/] </div> <div class="clear-10"></div> <div class="kuang sc_lb sc_hy "> <div class="sc_biaoti sc_hybj"> <h1>行业动态</h1><em>[@cms_channel id='258'][#if tag_bean??]<a href="${tag_bean.url}">更多>></a>[/#if][/@cms_channel]</em> </div> <ul> [@cms_content_list count='8' titLen='11' orderBy='4' channelOption='1' channelId='258' typeId='1'] [#list tag_list as a] <li><a href="${a.url}" target="_blank"title="${a.title}">[@text_cut s=a.title len=titLen append=append/]</a></li> [/#list] [/@cms_content_list] </ul> </div> <div > </div> </div> </div> </div> [#include "../include/页脚友情链接栏_水产.html"/] [#include "../include/页脚信息栏_水产.html"/] </div> </body> </html> |
||
---|---|---|---|