ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Create other common events ('owns', 'consume', 'blacklist')

Create other common events (‘owns’, ‘consume’, ‘blacklist’)

You can create ´click´, ´consume´ and other common events also manually by including the corresponding function call in selected view templates:

Example:

We copied the full view templates of an article (´/full/article.tpl´) into our own design and created an override for the class ´Article for recommendation´. Then we added the following code at the beginning of the .tpl file:

{* Article for recommendation - full view *}
<div {generate_common_event($node, 'click')}>
 click here to create CLICK event </div>
<div {generate_common_event($node, 'blacklist')}>
 click here to create BLACKLIST event </div>
<div {generate_common_event($node, 'owns')}>
 click here to create OWNS event </div>
<div {generate_common_event($node, 'clickrecommended')}>
 click here to create CLICK RECOMMENDED event </div>
<div {generate_rate_event($node, 4)}>
 click here to create RATE event with value 4</div>

After clearing caches and visiting the content of the class ´Article for recommendation´ in full view you will find a slightly changed view that you can use for temporary testing:

 

Again you can initiate and test an event type by clicking e.g. on ‘BLACKLIST’ and check the result in ‘<eZ publish root directory>/var/log/debug.log’:

[ Sep 11 2011 15:07:05 ] event.yoochoose.net/news/<strong><CustomerID></strong>/blacklist
 /131574611641487835/1/239?categorypath =%2F2%2F228%2F241%2F

...

Andrea Melo (29/05/2012 2:28 pm)

Andrea Melo (29/05/2012 2:28 pm)


Comments

There are no comments.