Show videos

You can show videos with smarty function on your template.

To add videos to any template, just include following code on your template


{insert name=show_videos assign=show_videos num_videos=5 type='new'}

{section name=i loop=$show_videos}

<p>
<a href="{$base_url}/view/{$show_videos[i].video_id}/{$show_videos[i].video_seo_name}/">
<img src="{$base_url}/thumb/{$show_videos[i].video_folder}1_{$show_videos[i].video_id}.jpg">
</a>

{$show_videos[i].video_title}

</p>

{/section}

This will disable 5 videos on your page. num_videos can be changed, for example, if you change num_videos to 10, that is

{insert name=show_videos assign=show_videos num_videos=10 type='new'}

It will show 10 videos.

'''type'''

type can be

  • top
  • new
  • recently_viewed
  • featured