用页面和分类设置导航条

以下是页面设置成导航

<nav class="menu" role="nav">
    <ul>
        <li class="nav nav-current"><a href="<?php $this->options->siteUrl(); ?>">home</a></li>

            <?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
            <?php while($pages->next()): ?>
                <li>|</li>
            <li class="nav nav-current"><a <?php if($this->is('page', $pages->slug)): ?><?php endif; ?> href="<?php $pages->permalink(); ?>"><?php $pages->title(); ?></a></li>

            <?php endwhile; ?>

                <li>|</li>
        <li class="nav nav-current"><a href="/feed/">rss</a></li>
    </ul>
</nav>

以下是分类设置成导航

<nav class="menu" role="nav">
    <ul>
        <li class="nav nav-current"><a href="<?php $this->options->siteUrl(); ?>">home</a></li>

            <?php $this->widget('Widget_Metas_Category_List')->to($cates); ?>
            <?php while($cates->next()): ?>
                <li>|</li>
            <li class="nav nav-current"><a href="<?php $cates->permalink(); ?>"><?php $cates->name(); ?></a></li>

            <?php endwhile; ?>

                <li>|</li>
        <li class="nav nav-current"><a href="/feed/">rss</a></li>
    </ul>
</nav>

代码

发表新评论
Gravatar图片显示区