Jump to Content

Objective HTML

Photo Frame

exp:photo_frame:colors

This method allows you to fetch colors from the database. It's important to note, that all variables are prefixed with "color:" by default.

Parameters

field_name=

This parameter will return only photos from the defined field name.

field_id=

This parameter will return only photos from the defined field_id.

limit=

This parameter will limit the number of photos returned.

offset=

This parameter will offset the number of photo returned.

order_by=

This parameter will change the order the photos returned.

prefix=

This parameter will change the default prefix, which is "color:".


{exp:photo_frame:colors}
	{color:photo_id}
	{color:rgb}
	{color:hex}
{/exp:photo_frame:colors}

{exp:photo_frame:colors prefix="var"}
	{var:rgb}
	{var:hex}
{/exp:photo_frame:colors}

sort=

This parameter will change the way the photos are sorted.

where:your_field_name=

This parameter will allow you to add additional searches to the query.


Variables

count
The loop count starting at 1
index
The loop count starting at 0
total_colors
The total number of photos
is_first_color
Is the loop iteration on the first photo. (Returns TRUE or FALSE)
is_last_color
Is the loop iteration on the last photo. (Returns TRUE or FALSE)
site_id
The site id
id
The photo frame color id
field_id
The photo frame field id
entry_id
The parent entry id
photo_id
The parent photo id
row_id
The parent photo row_id
col_id
The parent photo col_id
date
The date the color was created
depth
The depth of the color
r
The red color value
g
The green color value
b
The blue color value

Examples


{exp:photo_frame:colors}
	{color:id}
	{color:photo_id}
	{color:site_id}
	{color:field_id}
	{color:entry_id}
	{color:row_id}
	{color:col_id}
	{color:date}
	{color:depth}
	{color:r}
	{color:g}
	{color:b}
	{color:rgb}
	{color:hex}
	{color:is_first_color}
	{color:is_last_color}	
{/exp:photo_frame:colors}