days
Previous  Top  Next

The days loop is used to generate the days during which the articles on the current category page were published.

The basic syntax of the loop is:

{{loop days}}  
(body of loop goes here)  
{{/loop}}  
 
The loop starts does one iteration for each day on the current page in reverse chronological order.

Within the days loop, you can use these variables, whose contents change with each iteration:

·date  
A string variable containing the full date of the current day.  
 
·date.day  
A string variable containing the day of the month for the current day.  
 
·date.day_name  
A string variable containing the day of the month for the current day.  
 
·date.day_name_short  
A string variable containing the name of the day of the week for the current day.  
 
·date.month  
A string variable containing the number of the month for the current day.  
 
·date.month_name  
A string variable containing the name of the month for the current day.  
 
·date.month_name_short  
A string variable containing the abbreviated name of the month for the current day.  
 
·date.year  
A string variable containing the year for the current day.  

The days loop also contains the articles loop. For each iteration in the days loop, you can use the articles loop to iterate through the articles for that day. The articles loop does one iteration for each article in the current day in reverse chronological order.

Within the articles loop, you can use these variables, whose contents change with each iteration:

·author  
A string variable containing the name of the article's author. This is empty if the post is anonymous.  
 
·author_url  
A string variable containing the name of the article's author's URL, which s/he enters into the URL field of the Personal Settings for his/her account. This is empty if the author left this field blank.  
 
·body  
A string variable containing the body of the accompanying text for the article, which the author enters into the article Description field of the Post article or Edit article page.  
 
·can_post  
A boolean variable that is true if the current user is allowed to post a comment in reply to this article.  
 
·excerpt  
A string variable containing the excerpt of the article. This is empty if the post has no excerpt.  
 
·num_comments  
An integer variable containing the number of comments posted in response to this article.  
 
·num_trackbacks  
An integer variable containing the number of trackbacks for this article.  
 
·permalink_url  
A string variable containing the URL to the "permalink page" or article page" for this article.  
 
·post_reply_url  
A string variable containing the URL to the "comment page" for this article.  
 
·publish_time  
A string variable containing the time (in 12-hour clock format) when the article was published.  
 
·publish_time.24hour  
A string variable containing the hour (in 24-hour clock format) when the article was published.  
 
·publish_time.ampm  
A string variable containing "AM" if the article was posted between 00:00 and 11:59 inclusive and "PM" if the article was posted between 12:00 and 23:59 inclusive.  
 
·publish_time.day  
A string variable containing the day of the month when the article was published.  
 
·publish_time.day_name  
A string variable containing the name of the day of the week when the article was published.  
 
·publish_time.day_name_short  
A string variable containing the abbreviated name of the day of the week when the article was published.  
 
·publish_time.hour  
A string variable containing the hour (in 12-hour clock format) when the article was published.  
 
·publish_time.min  
A string variable containing the minute when the article was published.  
 
·publish_time.month  
A string variable containing the number of the month when the article was published.  
 
·publish_time.month_name  
A string variable containing the name of the month when the article was published.  
 
·publish_time.month_name_short  
A string variable containing the abbreviated name of the month when the article was published.  
 
·publish_time.sec  
A string variable containing the second when the article was published.  
 
·publish_time.year  
A string variable containing the year when the article was published.  
 
·publish_time.zone  
A string variable containing the standardized abbreviation for the timezone set for the article.  
 
·restricted  
A boolean variable that is true if the article was posted into a restricted category.  
 
·title  
A string variable containing the title of the accompanying text for the article, which the author enters into the Caption field of the Post article or Edit article page. This is empty if the article is has no caption.  
 
·trackback_rdf  
A string variable containing trackback RDF information.  
 
·view_url  
A string variable containing the URL for this article.  


Example
 
{{loop days}}  
 
<table>  
<tr>  
<td bgcolor="#000000">  
<font color="#FFFFFF">{{date.day_name}}, {{date.month_name}} {{date.day}}, {{date.year}}</font>  
</td>  
</tr>  
</table>  
 
{{loop articles}}  
 
<table>  
 
<tr>  
<td bgcolor="#C0C0C0">  
<h1>{{title}}</h1>  
</td>  
</tr>  
 
<tr>  
<td>  
{{body}}  
</td>  
</tr>  
 
<br><br>  
 
</table>  
 
{{/loop}}  
 
<br><br>  
 
{{/loop}}