Jump to Content

Objective HTML

Photo Frame

exp:photo_frame:last_photo

This method allows you to fetch the last photo in the returned results. If you use the offset parameter, it will reduce it backwards from the total results (opposite of the typicall offset).

Parameters

This method accepts all the parameters of the exp:photo_frame:photos.

limit=

By default, the limit is set to 1.

offset=

If you define an offset, it will offset the last photo that is returned. So if you offset of 1, then it would return the second to last photo. The default offset is 0.


Variables

All the global variables are supported.


Examples


{exp:photo_frame:last_photo}
	
	{photo:url}
	{photo:file}
	
{/exp:photo_frame:last_photo}

{exp:photo_frame:last_photo field_name="your_field"}
	
	{photo:url}
	{photo:file}
	
{/exp:photo_frame:last_photo}

{exp:photo_frame:last_photo entry_id="1"}
	
	{photo:url}
	{photo:file}
	
{/exp:photo_frame:last_photo}

{exp:photo_frame:last_photo entry_id="1" field_name="your_field"}
	
	{photo:url}
	{photo:file}
	
{/exp:photo_frame:last_photo}