[Radiant] Date tag oddness
Walter Lee Davis
waltd at wdstudio.com
Wed Mar 21 14:50:48 CDT 2007
Thanks.
On Mar 21, 2007, at 3:22 PM, John W. Long wrote:
> Walter Lee Davis wrote:
>> On Mar 21, 2007, at 1:34 PM, John W. Long wrote:
>>
>>> Walter Lee Davis wrote:
>>>> I cannot for the life of me figure out what drives the decision of
>>>> WHICH year this tag means:
>>>>
>>>> <r:date format="%Y" />
>>> It's the published_at date.
>>>
>>
>> So how can I bump this date? Do I unpublish and then re-publish a
>> page?
>> And if so, which one? I would like to bump the date for the entire
>> site
>> (in the footer).
>
> You would have to do that manually. Set the published_at date to nil
> and
> the status to draft. Then change it to published again.
>
> Something like this in script/console might work:
>
> page = Page.find_by_url('/path/to/my/page')
> page.status = Status[:draft]
> page.published_at = nil
> page.save!
> page.status = Status[:published]
> page.save!
>
I would like to second the motion for a tag that means Current Date. I
very often put the following in the footer of pages I make in PHP:
Copyright ©2004—<?=date('Y',time())?> Walter Davis Studio...
That's basically all I am after here in the footer. I had a really
confusing journey through the Ruby documentation, trying to find the
equivalent so I could try just writing this myself. But my lack of
patience and experience conspired against me figuring this out.
Thanks again,
Walter
More information about the Radiant
mailing list