关于织梦dedeCMS二级导航调用代码的一个问题?有没有织梦的大侠啊?
每个栏目的一级、二级导航调用的CSS代码都不太一样啊,该怎么调用呢:我现在写的是这样的:{dede:channelartlistrow='12'}<li><ahref="...
每个栏目的一级、二级导航调用的CSS代码都不太一样啊,该怎么调用呢:
我现在写的是这样的:
{dede:channelartlist row='12' }
<li><a href="{dede:field name='typeurl'/}"[field:rel/] id="nav_1" onmouseover="showMenu('nav_1','subnav1')">{dede:field name='typename'/}</a>
<div class="subnav disable" id="subnav1">
<p class="pointer">.</p>
<p><span>
{dede:channel type='son' noself='yes'}
<a href="[field:typelink/]">[field:typename/]</a>
{/dede:channel}
</span></p>
</div>
</li>
{/dede:channelartlist}
可是测试是错误的
<!--导航-->
<div class="nav">
<div class="navinner">
<ul class="navlist">
<li><a href="#">首页</a></li>
<li><a href="/News/Index.html" id="nav_1" onmouseover="showMenu('nav_1','subnav1')">第一章</a>
<div class="subnav disable" id="subnav1">
<p class="pointer">.</p>
<p><span>
<a href="#">概述</a> |
<a href="#">目录</a>
</span></p>
</div>
</li>
<li><a href="#" id="nav_2" onmouseover="showMenu('nav_2','subnav2')">第二章</a>
<div class="subnav disable" id="subnav2">
<p class="pointer">.</p>
<p><span>
<a href="#">市场调查</a> |
<a href="#">市场预期</a>
</span></p>
</div>
</li>
<li><a href="#" id="nav_3" onmouseover="showMenu('nav_3','subnav3')">第三章</a>
<div class="subnav disable" id="subnav3">
<p class="pointer">.</p>
<p><span>
<a href="#">投资介绍</a> |
<a href="#">后期收益</a> |
<a href="#">投资对比</a>
</span></p>
</div>
</li>
<!--导航结束--> 展开
我现在写的是这样的:
{dede:channelartlist row='12' }
<li><a href="{dede:field name='typeurl'/}"[field:rel/] id="nav_1" onmouseover="showMenu('nav_1','subnav1')">{dede:field name='typename'/}</a>
<div class="subnav disable" id="subnav1">
<p class="pointer">.</p>
<p><span>
{dede:channel type='son' noself='yes'}
<a href="[field:typelink/]">[field:typename/]</a>
{/dede:channel}
</span></p>
</div>
</li>
{/dede:channelartlist}
可是测试是错误的
<!--导航-->
<div class="nav">
<div class="navinner">
<ul class="navlist">
<li><a href="#">首页</a></li>
<li><a href="/News/Index.html" id="nav_1" onmouseover="showMenu('nav_1','subnav1')">第一章</a>
<div class="subnav disable" id="subnav1">
<p class="pointer">.</p>
<p><span>
<a href="#">概述</a> |
<a href="#">目录</a>
</span></p>
</div>
</li>
<li><a href="#" id="nav_2" onmouseover="showMenu('nav_2','subnav2')">第二章</a>
<div class="subnav disable" id="subnav2">
<p class="pointer">.</p>
<p><span>
<a href="#">市场调查</a> |
<a href="#">市场预期</a>
</span></p>
</div>
</li>
<li><a href="#" id="nav_3" onmouseover="showMenu('nav_3','subnav3')">第三章</a>
<div class="subnav disable" id="subnav3">
<p class="pointer">.</p>
<p><span>
<a href="#">投资介绍</a> |
<a href="#">后期收益</a> |
<a href="#">投资对比</a>
</span></p>
</div>
</li>
<!--导航结束--> 展开
3个回答
展开全部
{dede:channelartlist pagesize='20' row='20'}
<li><a href="[field:typelink/]" id="nav_[field:global name=autoindex/]" onmouseover="showMenu('nav_[field:global name=autoindex/]','subnav[field:global name=autoindex/]')">第一章</a>
<div class="subnav disable" id="subnav[field:global name=autoindex/]">
<p class="pointer">.</p>
<p><span>
{dede:arclist row='4' orderby='pundate'}
<a href="[field:arcurl/]">[field:title /]</a> |
{/dede:arclist}
</span></p>
</div>
</li>
{/dede:channelartlist}
测试 ok的,没问题 样式不一样的是数字,数字是有规律的,递增,那直接用递增的标签就可以了,我已经加上了,你测试下,
<li><a href="[field:typelink/]" id="nav_[field:global name=autoindex/]" onmouseover="showMenu('nav_[field:global name=autoindex/]','subnav[field:global name=autoindex/]')">第一章</a>
<div class="subnav disable" id="subnav[field:global name=autoindex/]">
<p class="pointer">.</p>
<p><span>
{dede:arclist row='4' orderby='pundate'}
<a href="[field:arcurl/]">[field:title /]</a> |
{/dede:arclist}
</span></p>
</div>
</li>
{/dede:channelartlist}
测试 ok的,没问题 样式不一样的是数字,数字是有规律的,递增,那直接用递增的标签就可以了,我已经加上了,你测试下,
追问
嗯,好的谢谢
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询