user-pic

将特定的tag列在blog边栏

Vote 0 Votes

这个博客的一些心得还是很实用的,而本站更新比较勤,这些文章很容易就被新的日志淹没。于是我想把这些文章列在blog边栏,方便大家阅读。

于是我就将这部分文章指定共同的tag 标签中,再通过MT提供的MTEntries模板标签,来结合tag 参数,列出这些具有特定tag 的文章。具体模板代码如下:


<div class="r-title">Commend</div>
<div id="commend" class="r-container-left">
<ul>
<MTEntries tag="@_commend">
<li>&#187; <a href="<$MTEntryPermalink$>" title="<MTEntryIfTagged>Tags: <MTEntryTags glue=", "><$MTTagName$></MTEntryTags><MTElse>No tags</MTElse></MTEntryIfTagged> "><$MTEntryTitle$></a></li>
</MTEntries>
</ul>
</div>

在MovableType 中以"@"开头的tags 将会被隐藏,也就是说这类tags 不会在MTTags 模板标签中显示出,但这个标签在其它方面与一个真正的标签没有任何区别,所以我为这部分文章指定了一个"@"作为前缀的tag (本站将“推荐阅读文章”用“@_commend”tag进行关联)。

Add a Reply

Forum Groups

Blogcs 基于MT平台的BSP

MovableType 中文化

1 0

Last Topic: Movable Type 中文化 - 平生一笑 by bb on 2008年10月11日

1 0

Last Topic: Zhu8's Weblog:猪八的网:浮生志 by Zhu8 on 2008年10月16日

MovableType 问题咨询

Be the first to post a topic in this forum

MovableType 使用

16 11

Last Topic: Image::Magick 模块的安装 by bb on 2008年11月 9日

30 35

Last Topic: MT-Twitter:将MT文章同步到Twitter by bb on 2008年3月 9日

22 1

Last Topic: 修改MT的作者归档路径 by bb on 2008年10月25日

MovableType 模板

Be the first to post a topic in this forum

22 17

Last Topic: MovableType评论格式化 replies-to-replies by bb on 2008年10月15日

MovableType 延伸

14 17

Last Topic: 从Wordpress转移到Movabletype by bb on 2007年5月12日

2 2

Last Topic: 最新版MovableType 4.22 已经发布 by bb on 2008年11月19日