Home Sign up Features Members Forums Control menu Search
Upsaid templates tutorials

Archives Main pages - step two: Placing the "Entry" template inside the "Date grouping" template

The "Date grouping" template is the html code inside of which the "Entry Templates" are to be included. This template is displayed on your main page for every day that an entry has been posted. This may sound a little confusing, so this image should help making it a little clearer.
The "Entry" templates must be included in the "Date Grouping" templates using the !!grouping!! variable. If we keep using the "Entry" template which we built in the previous chapter, our "Date grouping" template will constist in a simple html table:
<table cellspacing="8" bgcolor="#66CCCC">
    !!grouping!!
</table>
Let's now see what this will look like. Assuming that you posted one entry on a given day, and posted two the next day, this will be the output:
This is a title
This is the entry body
Posted at 5:42 pm
Comment this entry
This is a title
This is the entry body
Posted at 2:37 pm
Comment this entry
This is a title
This is the entry body
Posted at 4:05 pm
Comment this entry
As you may have figured, something importent is still missing: the dates on which these entries have been posted. Let's add this element on our "Date Grouping template":
<table cellspacing="8" bgcolor="#66CCCC">
    <tr><td>!!weekday!!, !!month!! !!monthday!! !!year!!</td></tr>
    !!grouping!!
</table>
This is what it will look like now:
Saturday, February 24 2002
This is a title
This is the entry body
Posted at 5:42 pm
Comment this entry
This is a title
This is the entry body
Posted at 2:37 pm
Comment this entry
Friday, February 23 2002
This is a title
This is the entry body
Posted at 4:05 pm
Comment this entry
© Upsaid.com, 2001 - 2003 Contact us - Privacy policy - Terms of use