百事都可乐 發表於 2023-7-25 00:00:00

详解如何修改织梦模板dedeCMS友情链接为下拉式

<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        修改dedecms友情链接为下拉式,改成下拉式的不仅可以分类清晰,而且连接多的话可以看起来简单,节省空间。不过,这样的友情链接对搜索引擎来说是不识别。</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        还是<u>说说</u>方法吧:</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        <strong>第一步:</strong></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        打开include\taglib下的flink.lib.php,将&lt;li&gt;&lt;/li&gt;改为</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        然后将第46行的</p>
<div class="jb51code" style='margin: 0px; padding: 0px; outline: none; line-height: 25.2px; font-size: 14px; width: 660px; overflow: hidden; clear: both; font-family: tahoma, arial, "Microsoft YaHei";'>
        <pre class="brush:php;toolbar:false;">
$link = "&lt;a href='".$dbrow-&gt;url."' target='_blank'&gt;".cn_substr($dbrow-&gt;webname,$titlelen)."&lt;/a&gt; "; </pre>
</div>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        改为</p>
<div class="jb51code" style='margin: 0px; padding: 0px; outline: none; line-height: 25.2px; font-size: 14px; width: 660px; overflow: hidden; clear: both; font-family: tahoma, arial, "Microsoft YaHei";'>
        <pre class="brush:php;toolbar:false;">
$link = "&lt;option value='".$dbrow-&gt;url."'&gt;".cn_substr($dbrow-&gt;webname,$titlelen)."&lt;/option&gt; ";

</pre>
</div>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        也可以通过dedecms的后台的模板-直接编辑。 </p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        <strong>第二步:</strong></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        修改首页模板</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        将原来的友情链接{dede:flink row='24'/}改为</p>
<div class="jb51code" style='margin: 0px; padding: 0px; outline: none; line-height: 25.2px; font-size: 14px; width: 660px; overflow: hidden; clear: both; font-family: tahoma, arial, "Microsoft YaHei";'>
        <pre class="brush:xhtml;">
&lt;select onchange="if(this.value!=''){window.open(this.value)}"&gt;
&lt;option value=""&gt;-- 知名网站 --&lt;/option&gt;{dede:flink row='24' typeid='1' /}&lt;/select&gt;
&lt;select onchange="if(this.value!=''){window.open(this.value)}"&gt;
&lt;option value=""&gt;-- 本地网站 --&lt;/option&gt;{dede:flink row='24' typeid='2' /}&lt;/select&gt; </pre>
</div>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        也就是分别调用第一和第二个分类的友情链接。</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。</p>
頁: [1]
查看完整版本: 详解如何修改织梦模板dedeCMS友情链接为下拉式