为什么自定义页面,导航栏~
为什么自定义页面,导航栏~
。。
emmm。。。
为什么导航栏不能自定义一个外部链接?
只能定死的域名前面路径. html后缀??想要链接一个外链或者是自定义一个链接要怎么办呢?
Re: 为什么自定义页面,导航栏~
可以手动修改模板文件 /usr/themes/default/header.php 在 </nav> 前加上你的外部链接地址
https://github.com/typecho/typecho/blob ... er.php#L60
https://github.com/typecho/typecho/blob ... er.php#L60
代码: 全选
<div class="col-mb-12">
<nav id="nav-menu" class="clearfix" role="navigation">
<a<?php if($this->is('index')): ?> class="current"<?php endif; ?> href="<?php $this->options->siteUrl(); ?>"><?php _e('首页'); ?></a>
<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
<?php while($pages->next()): ?>
<a<?php if($this->is('page', $pages->slug)): ?> class="current"<?php endif; ?> href="<?php $pages->permalink(); ?>" title="<?php $pages->title(); ?>"><?php $pages->title(); ?></a>
<?php endwhile; ?>
</nav>
</div>
代码: 全选
<div class="col-mb-12">
<nav id="nav-menu" class="clearfix" role="navigation">
<a<?php if($this->is('index')): ?> class="current"<?php endif; ?> href="<?php $this->options->siteUrl(); ?>"><?php _e('首页'); ?></a>
<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
<?php while($pages->next()): ?>
<a<?php if($this->is('page', $pages->slug)): ?> class="current"<?php endif; ?> href="<?php $pages->permalink(); ?>" title="<?php $pages->title(); ?>"><?php $pages->title(); ?></a>
<?php endwhile; ?>
<a href="http://your-external-link-here">anchor text</a>
</nav>
</div>