Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21116

recommendations.tpl limit ignored ?

    XMLWordPrintable

Details

    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()}
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            joaquim.cavalleri-obsolete@ez.no Joaquim Cavalleri (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: