Home  ›  Functions  ›  get_categories


Object name : categories
Function : get_categories
Reference : getCategoryList
File: includes/functions.php
Since: 3.0

This function will return an array of categories or used to display a list of categories of any object i.e videos, users, collections or groups etc. By default we are using this function in our category_list.html file found in all Clipbucket official templates.


This will assign an array of categories to $categories in Smarty Template

{get_categories assign=categories} //Will assign categories to a variable
{get_categories type=video echo=true} //Llist video categories
{get_categories type=video echo=true output=dropdown} //List video categories in <select> form

Parameter Name Options
type STRING Type/object of categories, can be videos, users, groups or photos , v and video will also work
echo BOOLEAN if set to true will echo output instead of assign value to variable
assign STRING assign category list to variable
output STRING Output type of the string, can be list, dropdown or checkbox
- list to display in li tags
- dropdwon to display in select ags
- checkbox to display in input tag with checkbox as type
list_style STRING collapsed or simple
- collapsed will hide sub categories with a plus sign to toggle hide/show
- simple will not hide any sub categories instead add an indent
with_all BOOLEAN true will add ‘All’ option in the list