The days loop is used to generate the days during which the photos 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 photos loop. For each iteration in the days loop, you can use the photos loop to iterate through the photos for that day. The articles loop does one iteration for each photo in the current day in reverse chronological order.

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

·author
A string variable containing the name of the photo's author. This is empty if the post is anonymous.

·author_url
A string variable containing the name of the photo'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 photo, which the author enters into the Photo Description field of the Post Photo or Edit Photo page.

·can_post
A boolean variable that is true if the current user is allowed to post a comment in reply to this photo.

·excerpt
A string variable containing the excerpt of the photo. This is empty if the post has no excerpt.

·num_comments
An integer variable containing the number of comments posted in response to this photo.

·num_trackbacks
An integer variable containing the number of trackbacks for this photo.

·permalink_url
A string variable containing the URL to the "permalink page" or photo page" for this photo.

·post_reply_url
A string variable containing the URL to the "comment page" for this photo.

·publish_time
A string variable containing the time (in 12-hour clock format) when the photo was published.

·publish_time.24hour
A string variable containing the hour (in 24-hour clock format) when the photo was published.

·publish_time.ampm
A string variable containing "AM" if the photo was posted between 00:00 and 11:59 inclusive and "PM" if the photo was posted between 12:00 and 23:59 inclusive.

·publish_time.day
A string variable containing the day of the month when the photo was published.

·publish_time.day_name
A string variable containing the name of the day of the week when the photo was published.

·publish_time.day_name_short
A string variable containing the abbreviated name of the day of the week when the photo was published.

·publish_time.hour
A string variable containing the hour (in 12-hour clock format) when the photo was published.

·publish_time.min
A string variable containing the minute when the photo was published.

·publish_time.month
A string variable containing the number of the month when the photo was published.

·publish_time.month_name
A string variable containing the name of the month when the photo was published.

·publish_time.month_name_short
A string variable containing the abbreviated name of the month when the photo was published.

·publish_time.sec
A string variable containing the second when the photo was published.

·publish_time.year
A string variable containing the year when the photo was published.

·publish_time.zone
A string variable containing the standardized abbreviation for the timezone set for the photo.

·restricted
A boolean variable that is true if the photo was posted into a restricted category.

·thumbnail_height
An integer variable containing the height of the thumbnail in pixels.

·thumbnail_url
A string variable containing the URL for the thumbnail image.

·thumbnail_width
An integer variable containing the width of the thumbnail in pixels.

·title
A string variable containing the title of the accompanying text for the photo, which the author enters into the Caption field of the Post Photo or Edit Photo page. This is empty if the photo is has no caption.

·trackback_rdf
A string variable containing trackback RDF information.

·view_url
A string variable containing the URL for this photo.



Example
The example code shown below is a simplified and slightly altered version of what's in the default photoalbum-byday template:

{{loop days}}

<h1>{{date}}</h1>
<hr>

{{loop photos}}

<!-- Draw the thumbnail and link it to the corresponding photo page -->
<p>
<a href="{{view_url}}">
<img class="thumbnail" src="http://blog.blogware.com/template/{{thumbnail_url}}" width="{{thumbnail_width}}" height="{{thumbnail_height}}" border="0">
</a>
<br />

<!-- Draw info about the photo -->

<!-- Title, with link -->
{{if title}}
<a href="{{view_url}}"><strong>{{title}}</strong></a>
{{else}}
<a href="{{view_url}}">Untitled</strong></a>
{{/if}}
<br />

<!-- Author -->
<strong>Posted by:</strong>&nbsp;
{{if author}}
{{if author_url}}
<a href="{{author_url}}">
{{/if}}
{{author}}
{{if author_url}}
</a>
{{/if}}
{{/if}}
<br />

<!-- When published -->
<strong>Publish date/time:</strong> {{publish_time}}
<br />

<!-- Excerpt -->
{{if excerpt}}
{{excerpt}}
{{/if}}

</p>

{{/loop}} <!-- photos -->

<hr>

{{/loop}} <!-- days -->

Here's what the template code above looks like when applied:

templates_photoalbum-byday_daysexample