开发者

How to use Tumblr's newDayDate "Template Tag"

开发者 https://www.devze.com 2023-02-09 00:33 出处:网络
I hope its ok to post this here ... can\'t find a Tumblr Forums Anyways, I\'ve been wanting to create my theme such that it outputs a h1 containing the date only on the 1st \"Day Date\" eg

I hope its ok to post this here ... can't find a Tumblr Forums

Anyways, I've been wanting to create my theme such that it outputs a h1 containing the date only on the 1st "Day Date" eg

h1: 6 Feb 2011

- Post for 6 Feb 2011
- Post for 6 Feb 2011
- Post for 6 Feb 2011

h1: 5 Feb 2011

- Post for 5 Feb 2011
- Post for 5 Feb 2011
- ...

Hope you get the idea? I 开发者_运维百科think I should use the newDayDate "tag", but when I try it like

{block:posts}

{block:newDayDate}
<h1 class="ribbon">
  <span class="ribbon-triangle"></span>
  <a href="/day/{Year}/{MonthNumberWithZero}/{DayOfMonthWithZero}">{DayOfMonth}<small><small><sup>{DayOfMonthSuffix}</sup></small></small> {ShortMonth} {Year}</a>
</h1>
{/block:newDayDate}

<article>
  {block:Text}
  {block:Title}<h1>{Title}</h1>{/block:Title}
  {Body}
  {/block:Text}

It just outputs something like

h1: 7 June 2006

- Post for 10 June 2006 // later dates does not seem to be captured
- Post for 9 June 2006 
- Post for 9 June 2006
- Post for 7 June 2006 // Only earliest date on the page is rendered
- Post for 7 June 2006

How can I make it work?

0

精彩评论

暂无评论...
验证码 换一张
取 消