Showing the list of associated categories in the content (Clip, Channel, News, Event, Gallery) lists.
support, ws.webtv, advanced, customization, showing, categories, content, lists
Since WS.WebTV v3.1 (R50) it is possible to show the category associated with the content, in the lists. Example:
Since this feature adds a bit of extra work to the server, it is disabled by default. If you wan to enable this feature, it is necessary to add certain variables to the config/Config.inc.php file, before the PHP closing tag (?>).
General options
The following options are available:
$CONTENT_LISTS_INCLUDE_CATEGORIES = true; // [REQUIRED] this must be set to true, otherwise the rest of options won't have any effect!! $CONTENT_LISTS_INCLUDE_CATEGORIES_LIMIT = 1; // the maximum number of categories to display (in case more than one is associated with a content) $CONTENT_LISTS_INCLUDE_CATEGORIES_EXCLUDE_CURRENT = true; // when visiting a category, whether to exclude the current category $CONTENT_LISTS_INCLUDE_CATEGORIES_CACHE_TIME = 600; // the live (in seconds) for the categories association cache (600 seconds = 10 min)
Showing categories in clip lists
The following variables enable the category display in several clip lists (copy and paste those that you want):
$CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["clips"]["ajax_list"] = true; // the video browser (clip and channel pages) $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["clips"]["category_page"] = true; // clip list in the category pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["clips"]["list"] = true; // various clip lists: latest, upcoming, favorited, watched, liked $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["clips"]["portal_page"] = true; // clip list in portal pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["clips"]["search"] = true; // clip list in searches $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["clips"]["user_page"] = true; // clip list in user profile pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["clips"]["widget_list"] = true; // clip list in widgets
Showing categories in channel lists
The following variables enable the category display in several channel lists (copy and paste those that you want):
$CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["channels"]["category_page"] = true; // channel list in the category pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["channels"]["list"] = true; // latest channels list $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["channels"]["portal_page"] = true; // channel list in portal pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["channels"]["search"] = true; // channel list in searches $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["channels"]["user_page"] = true; // channel list in user profile pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["channels"]["widget_list"] = true; // channel list in widgets
Showing categories in page lists
The following variables enable the category display in several page lists (copy and paste those that you want):
$CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["pages"]["category_page"] = true; // page list in the category pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["pages"]["list"] = true; // Latest pages list $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["pages"]["portal_page"] = true; // page list in portal pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["pages"]["search"] = true; // page list in searches $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["pages"]["user_page"] = true; // page list in user profile pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["pages"]["widget_list"] = true; // page list in widgets
Showing categories in news lists
The following variables enable the category display in several news lists (copy and paste those that you want):
$CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["news"]["category_page"] = true; // new list in the category pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["news"]["list"] = true; // latest news list $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["news"]["portal_page"] = true; // news list in portal pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["news"]["search"] = true; // news list in searches $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["news"]["user_page"] = true; // news list in user profile pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["news"]["widget_list"] = true; // news list in widgets
Showing categories in event lists
The following variables enable the category display in several event lists (copy and paste those that you want):
$CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["events"]["category_page"] = true; // event list in the category pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["events"]["list"] = true; // latest events list $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["events"]["portal_page"] = true; // event list in portal pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["events"]["search"] = true; // event list in searches $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["events"]["user_page"] = true; // event list in user profile pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["events"]["widget_list"] = true; // event list in widgets
Showing categories in gallery lists
The following variables enable the category display in several gallery lists (copy and paste those that you want):
$CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["galleries"]["category_page"] = true; // gallery list in the category pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["galleries"]["list"] = true; // latest galleries list $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["galleries"]["portal_page"] = true; // gallery list in portal pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["galleries"]["search"] = true; // gallery list in searches $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["galleries"]["user_page"] = true; // gallery list in user profile pages $CONTENT_LISTS_INCLUDE_CATEGORIES_SECTIONS["galleries"]["widget_list"] = true; // gallery list in widgets
Styling the categories in lists....
Once your categories are appearing, they will be displayed as normal links. If you want them to loook like those of the example image then you can style them as follows (feel free to experiment and add additional selectors according to the IDs of your categories):
NOTE: Add the following from the Content Administrator into Configuration > General > Additional HTML Code / <head> section.
<style> /* Styling on the V2 Theme Example of how to colorize the categories in the V2 Theme Note the li.categoryID selector ... it allows coloring the categories by their ID */ .itemList .item .categories li:after { content:""; } .itemList .item .categories li { padding:3px; } .itemList .item .categories li a { color:#fff; text-decoration:none; } .itemList .item .categories li.category { background:#888; border-radius:6px; } .itemList .item .categories li.category:hover { background:#000; } .itemList .item .categories li.category1 { background:#C39; } .itemList .item .categories li.category2 { background:#C00; } .itemList .item .categories li.category3 { background:#060; } .itemList .item .categories li.category4 { background:#F60; } /* Styling on the Default/Classic Theme Example of how to colorize the categories in the Default/Classic Theme Note the li.itemCategoryID selector ... it allows coloring the categories by their ID */ .item .itemCategories li:after { content:""; } .item .itemCategories li { padding:3px; } .item .itemCategories li a { color:#fff !important; text-decoration:none; } .item .itemCategories li.itemCategory { background:#888; border-radius:3px; } .item .itemCategories li.itemCategory:hover { background:#000; } .item .itemCategories li.itemCategory1 { background:#C39; } .item .itemCategories li.itemCategory2 { background:#C00; } .item .itemCategories li.itemCategory3 { background:#060; } .item .itemCategories li.itemCategory4 { background:#F60; } </style>