在类别页面 Blogger 中标记为 header
Label as header in Category Page Blogger
我有一个网站,我可以在其中显示具有所有相同标签的帖子。在显示具有相同标签的所有帖子时,有没有办法将标签设为 header 。
例如,在 https://newsotuniverse.blogspot.ca/search/label/astrophysics is there a way to make the header 'Astrophysics' or on https://newsotuniverse.blogspot.ca/search/label/engineering 上制作 header 'Engineering'?
我想把标签的名称(header)放在这个:
<b:if cond='data:navMessage'>
<div class='status-msg-wrap'>
<div class='status-msg-body'>
<data:label.url/>
//label header here plz
</div>
<div class='status-msg-border'>
<div class='status-msg-bg'>
<div class='status-msg-hidden'><data:navMessage/></div>
</div>
</div>
</div>
<div style='clear: both;'/>
只需将 //label header here plz
替换为 <data:blog.searchLabel/>
,此数据标记 returns 当前过滤的标签。
它云的样子,像这样:
...
<div class='status-msg-wrap'>
<div class='status-msg-body'>
...
<span style="text-transform: capitalize;"><data:blog.searchLabel/></span>
...
</div>
<div class='status-msg-border'>
<div class='status-msg-bg'>
<div class='status-msg-hidden'><data:navMessage/></div>
</div>
</div>
...
The wrapping span
is set only so that we can set the css property text-transform
to capitalize
, since I Like my headers capitalized.
我有一个网站,我可以在其中显示具有所有相同标签的帖子。在显示具有相同标签的所有帖子时,有没有办法将标签设为 header 。
例如,在 https://newsotuniverse.blogspot.ca/search/label/astrophysics is there a way to make the header 'Astrophysics' or on https://newsotuniverse.blogspot.ca/search/label/engineering 上制作 header 'Engineering'?
我想把标签的名称(header)放在这个:
<b:if cond='data:navMessage'>
<div class='status-msg-wrap'>
<div class='status-msg-body'>
<data:label.url/>
//label header here plz
</div>
<div class='status-msg-border'>
<div class='status-msg-bg'>
<div class='status-msg-hidden'><data:navMessage/></div>
</div>
</div>
</div>
<div style='clear: both;'/>
只需将 //label header here plz
替换为 <data:blog.searchLabel/>
,此数据标记 returns 当前过滤的标签。
它云的样子,像这样:
...
<div class='status-msg-wrap'>
<div class='status-msg-body'>
...
<span style="text-transform: capitalize;"><data:blog.searchLabel/></span>
...
</div>
<div class='status-msg-border'>
<div class='status-msg-bg'>
<div class='status-msg-hidden'><data:navMessage/></div>
</div>
</div>
...
The wrapping
span
is set only so that we can set the css propertytext-transform
tocapitalize
, since I Like my headers capitalized.