Details
-
Improvement
-
Resolution: Obsolete
-
Medium
-
5.1
-
eZ Recommentation 5.1
Description
Either Adding Recommendations documentation is incorrect or content/recommendations.tpl needs to be updated.
In the documentation it is suggested that recommendation rendering can be achieved through
{include uri='design:content/recommendations.tpl' node=$node scenario='top_clicked' limit=3 category_based=false() track_rendered_items=true() create_clickrecommended_event=true()}
But this limit parameter is not being used at all.
Inspecting the tpl makes it clear that the expected parameter should be named numrecs
Steps to reproduce:
- include the following in a template override (where everything is configured for recommendations to be used)
{include uri='design:content/recommendations.tpl' node=$node scenario='top_clicked' limit=1 category_based=false() track_rendered_items=true() create_clickrecommended_event=true()}
- Notice that up to 3 recommendations will be rendered (only 1 was expected)
Workaround
include the following code instead
{include uri='design:content/recommendations.tpl' node=$node scenario='top_clicked' numrecs=1 category_based=false() track_rendered_items=true() create_clickrecommended_event=true()}