- b2evolution CMS User Manual
- Developer Reference
- Website Skins/Themes
- Skin Tags / API
- Item Tags
- Template Tag: Item Mod Date
Template Tag: Item Mod Date
This displays the last modified date (datetime) of a Post/Item.
Example
Quick Template
[Item:mod_date|format=#short_date_time]
PHP Template
$Item->get_mod_date( '#short_date_time' )
Parameters
Param |
Default |
Usage |
---|---|---|
|
|
Possible values: |
Return value
This tag displays content only, it does not have a return value.
Additional Examples
Some skins have the date in an image / icon. To do that you can use multiple $Item->mod_date
calls like so:
<ul class="datetime">
<li class="month">
<?php
$Item->mod_date( $format = 'm' );
?>
</li>
<li class="day">
<?php
$Item->mod_date( $format = 'd' );
?>
</li>
</ul>
This is an example style:
ul.datetime {
background: url(images/calendar-blue.png);
background-repeat: no-repeat;
width: 66px;
height: 67px;
text-align: center;
float: left;
color: white;
font-size: 10px;
font-weight: bold;
margin: 0px;
margin-top: 3px;
margin-right: 10px;
padding-top: 1px;
margin-bottom: 0px;
}
li.month {
list-style: none;
padding-top: 0px;
margin-top: 0px;
}
li.day {
font-size: 35px;
font-weight: bold;
color: rgb(65, 65, 65);
padding-top: 8px;
padding-bottom: 0px;
margin-bottom: 0px;
letter-spacing: -1px;
list-style: none;
}