[consulting] Formating the date module with cck fields
Holly Ferree
hferree at gmail.com
Wed Dec 2 01:08:41 UTC 2009
Hello All,
I have a client that wants to be able to back date themselves without having
the stress of editing the database. What's the best way to do this?
They want the below information in a nice little css box:
<div class="calendar">
<small>Jan</small>
<strong>03</strong>
<small>2009</small>
</div>
I tried just creating the appropriate 3 cck boxes but had issues with the
Month being alphabetical in shorting. I could add another field for the
numeric date to short by, but that seems redundant and not the best way.
Using the date module, I am having trouble figuring out how to format it. I
have node-article.tpl.php with the line:
<?php echo $node->field_date[0]['view'];?>
It prints in the page, has the correct back date, very happy, (don't want
the time printed though) but I need to separate the month, day and year
values so I can give the appropriate css.
Any ideas? I tried using the devel module to help me figure out the values,
but no luck.
Thanks,
Holly Ferree, Graphic Designer, BFA
813.786.0852
hferree at gmail.com
http://www.designbyholly.com/
Here's the css for the calendar if it matters:
.calendar {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#EEEEEE url(images/ribbed.gif) repeat scroll 0 0;
border:1px solid #CCCCCC;
color:#2E2E2E;
display:inline;
float:right;
line-height:1.5em;
margin-left:0;
padding:5px;
position:relative;
text-align:center;
width:35px;
}
More information about the consulting
mailing list