想要标签栏RSS也能和标签那样直接选择订阅?这里有非常简单的方法。感谢 PurpleMoggy.
<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<ul>
<b:loop values='data:labels' var='label'>
<li>
<a expr:href='data:post.url + "/feeds/posts/default/-/" + data:label.name'><img src='http://img304.imageshack.us/img304/3518/rect18st2.png'/></a>
<b:if cond='data:blog.url == data:label.url'>
<data:label.name/>
<b:else/>
<a expr:href='data:label.url'><data:label.name/></a>
</b:if>
(<data:label.count/>)
</li>
</b:loop>
</ul>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
把上面颜色加深的代码加进的标签栏即可。
如果你想要下拉式菜单的标签形式来给大家订阅标签RSS呢?
用下面这段代码替换:
<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<select onchange="'location="this.options[this.selectedIndex].value;'">
<option>选择标签RSS</option>
<b:loop values="'data:labels'" var="'label'">
<option value="'data:post.url"><data:label.name/>
(<data:label.count/>)
</option>
</b:loop>
</select>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
0 评论:
发表评论: ☆欢迎灌水☆言论自由☆交流快乐☆