1 Introduction
Tagcloud module is designed for displaying a tagcloud in your CMS pages.
It searches for pages (CMS objects 10007.X) in given list list of folders (CMS objects 10002.X), takes content of “tagging” attribute and generates a tagcloud. Tagcloud is a list of links pointing to predefined CMS page.
2 Structure
Tagcloud module is placed in folder <portal>/common/modules/tagcloud
I consists of
- component: TagcloudApi
- controllers: PreviewController
- widget: TagcloudWidget
3 Tagcloud widgets
There is 1 widget:
- TagcloudWidget – shows content overview based on given parameters.
3.1 TagcloudWidget
Invokes:
<?php
$this->widget(
'tagcloud.widgets.TagcloudWidget',
array(
'folderIds'=>array('10002.21', '10002.3281', '10002.7', '10002.3343'),
'usePersonalisation' => false,
'overviewPage' => 'test.html',
'tagstyles' => array('cls1', 'cls2'),
'tagsSeparator'=>',',
'limit' => 5
)
);
?>
Parameters:
- folderIds (array) – array of CMS folder IDs (10002.x,10002.x)
- usePersonalisation (bool) – default is true. Defines if result should be personalised or not
- overviewPage (string) – defines CMS page where personalizedContentWidget is placed
- tagsSeparator (string) – defines string that separates tags in “tagging” attribute
- tagstyles (array) – defines weights gradations quantity and styles for tags in output
- limit (integer) – default is 10. The limit of tags number
3.2 Preview mode
Preview is available by this URL: <site_url>/tagcloud/preview
Preview Parameters:
- folderIds (string) – comma separated folder IDs(ex.: 21,22,23). System will explode string by comma and add “10002.” to each element (ex.: 10002.21,10002.22,10002.23);
- usePersonalisation (string) – default is Y. Defines if result should be personalised or not, Y – for “yes”, N – for “no”;
3.3 Module Configuration
'tagcloud' => array(
//Component class
'class' => 'common.modules.tagcloud.tagcloudModule',
// cache life time in seconds
'cacheTime' => 60,
//default CMS page with personalizedOverview widget
'defaultOverviewPage' => '/Content.Node/testing/Overview.en.html',
//CMS pages with personalizedOverview widget per language
'overviewPages' => array(
'en' => '/Content.Node/testing/Overview.en.html',
'de' => '/Content.Node/testing/Overview.de.html',
),
//String that will be used as tags separator
'tagsSeparator' => ', ',
//tagstyles. Array of styles for tags. Controls weights gradations and styles.
// So if 3 gradations defined - tags would be separated into 3 categories
//must be defined from most light(rare) to most heavy(frequent)
'tagstyles' => array(
'tagsize_1', //ex.: 10px
'tagsize_2', //ex.: 14px
'tagsize_3', //ex.: 16px
)
),