I’ve got another tricky html/css/modx code for you to help me with...
On my website
www.katskinner.com I desire the created on (or edited if thats easier with coding, but this is less preferential) to be displayed similar to the attached image:
I have created the html and css for this, however I am having trouble finding the appropriate calls for modx...
The HTML I have:
<div class="post_date">
<span class="day">31</span>
<span class="month">July</span>
<span class="year">2009</span>
</div>
and the CSS I have is:
.post_date {
background-image: url(assets/components/KatSkinnerTheme/images/footer_bg.jpg);
float:left;
margin:10px;
margin-left: -30px;
padding:45px 8px 0;
position:relative;
color: #white;
}
.post_date .day {
font-size:52px;
left:5px;
line-height:45px;
position:absolute;
top:-10px;
}
.post_date .month {
font-size:25px;
text-transform:uppercase;
}
.post_date .year {
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
display:block;
position:absolute;
right:-5px;
top:15px;}
Can someone help me figure out the code to go in the appropriate place within HTML please (i.e. the code that will call the day, month and year seperately). I have only been able to figure out how to use the general "createdon" call...
Thanks in advance
Kat Skinner
Visit www.katskinner.com for all your expert novel writing tips, tutorials and more.
@Dimmy,
I couldn’t follow the link as it was 404, and phx didnt come up in package manager under revolution...
The calls did separate day, month and year perfectly, however I just need to get it to show the right date now... Any suggestions to resolve the issue of phx not showing up???
Visit www.katskinner.com for all your expert novel writing tips, tutorials and more.
-
☆ A M B ☆
- 24,524 Posts
I do believe that phx is built-in to Revo, so there’s nothing to install.
Hmmm...
Well I did the calls you suggested below:
<div class="post_date">
<span class="day">[[*createdon:date=`%d`]]</span>
<span class="month">[[*createdon:date=`%b`]]</span>
<span class="year">[[*createdon:date=`%Y`]]</span>
</div>
However it only shows up 01 for the day, Jan for month and 1970 for the year... any suggestions??
Visit www.katskinner.com for all your expert novel writing tips, tutorials and more.
ok I did not know that you used revo
somehow the createdate is not there I think thats why its giving you this date
try using: publishedon instead
could you display the date unformated like [[*createdon]] to see if there is a good timestamp there
No luck
<div class="post_date">
<span class="day">[[*publishedon:date=`%d`]]</span>
<span class="month">[[*publishedon:date=`%b`]]</span>
<span class="year">[[*publishedon:date=`%Y`]]</span>
</div>
Still brings up the exact same 01, Jan, 1970 issue.
The straight [[*createdon]] code brings up the following "2010-06-15 21:55:31" (it does not seem to vary for any of the posts).
The straight [[*publishedon]] code brings up the following "2010-06-15 21:56:00" (it does not vary for any of the posts either). I double checked the published times and dates for the posts I am trying to display the date code on, and they range from the 16th to the 17th of this month with varying times.
Visit www.katskinner.com for all your expert novel writing tips, tutorials and more.