Channel Videos Documentation

Tags

These terms are used throughout the documentation:
required: This parameter/field is required for this tag to function.
form only: This can only be set as a field in the form and not as a parameter in the tag.
param only: This parameter can only be set in the tag and not as a field in the form.
fixed value: This field cannot be edited and is set with a fixed value.
recurring only: This parameter/field only applies to recurring charges.
one-time only: This parameter/field only applies to one-time charges.
added in X.X.X: This parameter/field is only available from this version forward.
logged in: This tag is only available if the user is logged in.
Tag Parameters
entry_id
Entry ID of an Channel Entry. Use this parameter to limit the videos list to a specific entry.
{exp:channel_videos:videos entry_id="1"}
url_title
Same as entry_id=”” but now it with the entry url_title.
{exp:channel_videos:videos url_title="title"}
field
Limit results by specific field, separate multiple with a pipe delimiter "|"
{exp:channel_videos:videos field="field1 | field2"}
field_id
Limit results by specific field_id (faster then field="")
{exp:channel_videos:videos field_id="1 |2"}
video_id
Video ID of an video. Use this parameter to limit the video list to a specific video.
{exp:channel_videos:videos video_id="4"}
orderby
The “order” parameter sets the display order of the videos. Setting options for this parameter include: video_order, duration, views, date. Default is video_order.
Default: video_order
{exp:channel_videos:videos orderby="duration"}
sort
asc | desc
The sort order can be ascending or descending. Setting options for this parameter include: - sort=”asc” - sort=”desc”
{exp:channel_videos:videos sort="desc"}
limit
This parameter limits the number of videos on any given page. The limit will default to 30 entries if a value is not specified. If you are using pagination then this will determine the number of entries shown per page.
Default: 30
{exp:channel_videos:videos limit="10"}
offset
This parameter offsets the display by X number of entries. For example, if you want to show all entries except the three latest ones, you would do this: offset=”3”
{exp:channel_videos:videos offset="3"}
embed_width
The width of the embed. Default: 480
Default: 480
{exp:channel_videos:videos embed_width="300"}
embed_height
The height of the embed. Default: 385
Default: 385
{exp:channel_videos:videos embed_height="280"}
prefix
{exp:channel_videos:videos prefix="new_prefix_to_avoid_name_colliding"}
Variables
video:id
The internal Video ID.
{video:id}
video:service
Displays from video service this video is from. Possible value: youtube or vimeo.
{video:service}
video:service_id
This variable displays the ID of the video (the video ID of youtube or vimeo).
{video:service_id}
video:title
The video title.
{video:title}
video:description
The video description.
{video:description}
video:username
The username of the author (if available).
{video:username}
video:author
The video author.
{video:author}
video:date
The date the video has been published.
{video:date}
video:views
The amount of views a video has received.
{video:views}
video:duration
The duration of the video. Example output: 32 sec or 23min etc.
{video:duration}
video:duration_secs
The duration of the video in seconds.
{video:duration_secs}
video:url
The URL to the SWF.
{video:url}
video:url_hd
The URL to the SWF in HD (Youtube only).
{video:url_hd}
video:img_url
The URL to an image of the video.
{video:img_url}
video:img_url_hd
A higher quality URL to an image of the video.
{video:img_url_hd}
video:web_url
The full URL to the webpage of the video.
{video:web_url}
video:embed_code
This variable will output the embed code for the video.
{video:embed_code}
video:embed_code_hd
This variable will output the embed code for the video.
{video:embed_code_hd}
video:count
The “count” out of the current videos being displayed. If five videos are being displayed, then for the fourth video the {video:count} variable would have a value of “4”.
{video:count}
video:total
The total number of videos being displayed.
{video:total}
{if video:no_videos}
CONDITIONAL
This tag will conditionally display the code inside the tag if there are no videos.

{exp:channel:entries channel="your_channel"}
    <h1>{title}</h1>
    {exp:channel_videos:videos entry_id="{entry_id}"}
        {if video:no_videos}
            <p>There are no videos!</p>
        {/if}
        <h3>{video:title}</h3>
        {video:embed_code}
    {/exp:channel_videos:videos}                           
{/exp:channel:entries}
Exterior Conditional Example
Example:
If you would like to check if your entry has Channel Videos but dont want to put the conditional inside the Channel Videos tag, you could use this alternate conditional:

{exp:channel:entries channel="your_channel"}
    <h1>{title}</h1>
    {if '{exp:channel_videos:videos entry_id="{entry_id}" limit="1"}{video:total}{/exp:channel_videos:videos}' != ''}
        <div class="your-extra-html-elements">
            <div class="that-you-really-want-here">
                <div class="but-only-if-there-are-videos">
                    {exp:channel_videos:videos entry_id="{entry_id}"}
                        <div>
                            <h3>{video:title}</h3>
                            {video:embed_code}
                        </div>
                    {/exp:channel_videos:videos}
                </div>
            </div>
        </div>
    {/if}
{/exp:channel:entries}

Support

Having problems setting up and/or using Channel Videos? Support is offered from 10am to 4pm EST weekdays. Send us an email at help@eeharbor.com and we will respond as quickly as we can.

loading