码迷,mamicode.com
首页 > 其他好文 > 详细

DEDE 调用导航栏的两种方法

时间:2015-08-04 10:39:41      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:

标签调用

 

{dede:channelartlist typeid=‘top‘ row=‘10‘}
<li> <a href="{dede:field name=‘typeurl‘/}">{dede:field name=‘typename‘/}</a>
<div class="nav-w">
<div class="section-nav1">
<ul>
{dede:channel type=‘son‘ noself=‘yes‘}
<li><a href="[field:typeurl/]">[field:typename/]</a></li>
{/dede:channel}
</ul>
</div>
</div>
</li>
{/dede:channelartlist}

 

SQL语句调用

 

<?php
$dsql->Execute(‘me‘,"SELECT * FROM `#@__arctype` arc WHERE ishidden = ‘0‘ AND topid = ‘0‘ ORDER BY sortrank ASC limit 7");
while($arr = $dsql->GetArray())
{
echo ‘<li>‘;if($arr[‘ispart‘]==2){ echo ‘<a href="‘.$arr[‘typedir‘].‘" >‘;}else{echo ‘<a href="../plus/list.php?tid=‘.$arr[‘id‘].‘" >‘;}echo $arr[‘typename‘].‘</a>

 

<div class="nav-w">
<div class="section-nav1"><ul>‘;
$dsql->Execute(‘me2‘,"SELECT * FROM `#@__arctype` arc WHERE ishidden = ‘0‘ AND topid = {$arr[‘id‘]} ORDER BY sortrank ASC limit 7");
while($arr2 = $dsql->GetArray(‘me2‘))
{
echo ‘<li>‘;if($arr2[‘ispart‘]==2){ echo ‘<a href="‘.$arr2[‘typedir‘].‘"‘; if($arr2[‘seotitle‘]==1){echo ‘target="_blank"‘;} echo ‘>‘;}else{ echo ‘<a href="../plus/list.php?tid=‘.$arr2[‘id‘].‘" >‘;}echo $arr2[‘typename‘].‘</a></li>‘;
}

echo ‘</ul>
</div>
</div>
</li>‘;
}
?>

 

DEDE 调用导航栏的两种方法

标签:

原文地址:http://www.cnblogs.com/www-xiaobo-com/p/4701148.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!