Personalized Content Overview module

This chapter describes

1 Introduction

Personalized Content Overview module is designed for overview of CMS content (like news overviews).

It takes page objects from CMS (10007.X) and displays them in an overview based on current user’s personalization attributes and the given template.

2 Structure

Personalized Content Overview module is placed in folder <portal>/common/modules/personalizedContent.

I consists of:

  • component: PersonalizedContent
  • controllers: PreviewController
  • widget: PersonalizedContentWidget

3 Personalized Content Overview widgets

There is 1 widget:

  • PersonalizedContentWidget – shows content overview based on given parameters.

3.1 Personalized Content OverviewWidget

Invokes:


    <?php
        $this->widget('personalizedContent.widgets.PersonalizedContentWidget',array(
        'folderIds'=>array('10002.21', '10002.3281', '10002.7'),
        'tplString'=>'<div class="personalized-content-item">
               <a href="{{url}}">{{name}}</a>
               <br/>
               <a href="{{url}}">{{url}}</a>
               <br/>
               <span>{{content}}</span>
               date:{{date}}<br/>
               time:{{time}}<br/>
               datetime:{{datetime}}<br/>
               </div>',
               'gccRequestParams' => 'languagecode,name,node_id',
               'perPage' => 8,
               'sorting' => 'createtimestamp:desc',
           ));
    ?>

Parameters:

  • folderIds (array) – array of CMS folder IDs (10002.x,10002.x);
  • tplString (string) – HTML string that will be used as template for result output;
  • usePersonalisation (bool) – default is true. Defines if result should be personalised or not;
  • gccRequestParams (string) – GCC request params. Comma separated;
  • sorting (string) – expression for sorting;
  • perPage (integer) – how many result items show per page. You can use module parameter “enableArrowsInPaging” (default true) to choice the style of next/previous links (true – “<<”, “>>” ; false – “previous”, “next”);

3.2 Preview mode

Preview is available via: <site_url>/personalizedContent/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);
  • pageId (string) – content ID of CMS page that contains template for each item of personalized content (ex.: 10007.16). System will request Gentics Content Connector for that page and use it’s content as tplString (see widget param: tplString) for output;
  • usePersonalisation (bool) – default is true. Defines if result should be personalised or not;

4 Keywords available in tplString

  • {{name}} – will be replaced with content name
  • {{url}} – will be replaced with content url
  • {{content}} – will be replaced with content (if requested)
  • {{datetime}} – will be replaced with date and time in current locale format
  • {{date}} – will be replaced with date in current locale format
  • {{time}} – will be replaced with time in current locale format