Hey Everyone,

I am trying to create a news block snippet and I have hit a road block as far as themeing the Format Date function using CSS.

I am trying to seperate the Day, Month and Year into their own div, or span.

Here is what I have:
'<div id=\'newsdate\'in >'. format_date($anode->created, 'custom', ' M | Y'). '</div>';

I tried something like this to break apart:

  $items[]= l($anode->title, "node/$anode->nid") .
'<div id=\'class1\'>'. format_date($anode->created, 'custom', 'M). '</div>';
  $items[]= $anode->created .
'<div id=\'class2\'>'. format_date($anode->created, 'custom', ' Y'). '</div>';

Although it does work, I'm not sure it is the correct way to do this and I also have a hard time repositioning it to where I want it, possibly because of the way it is coded.

Ideally, what I would like to have is (brackets indicate DIV tag):

AS LIST

[YEAR] [DAY MONTH] [NODE TITLE]

If anyone has some insight into how to do this correctly, please let me know.

Comments

Anonymous’s picture

Also, if this could be done using the VIEWS module that would be a plus.

Thanks in advance,

txcrew