Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Latest content

This block allows you to display the latest published contents from a sub-tree based on the content type defined in the block. To add a latest content block log in to the eZ Flow front-end editing interface to edit the front page.

Select a zone and in the block type list you select "Latest content" from the drop down list as in the screen below.

Note: In dynamic blocks, like "Latest content", the content of the block will be fetched with the access rights of an anonymous user. eZ Publish behaves like this in order to ensure that the front page content will be available to any user. This is currently required due to the eZ Flow implementation: content for dynamic blocks isn't generated when viewed, and is therefore fetched as if seen by a user.

The following block will be added to the block list. Here you are able to name the block. Next choose a source to limit the location where the latest content should be fetched and define the additional parameters such as the class, overflow and the rotation frequency of the content, set in minutes, hours or days.

And click "Send for publishing" to complete the procedure.

Usage with translation

eZ Flow always list objects not translations. If you are using more than one language, consider that you can have a different number of items according to the language.

Note : If it is a problem for you, consider the following workaround.

The idea is to put more items in the pool, so more objects will be loaded. Then you can filter this items depending on the siteaccess language.

  • First you have to apply the patch available in this JIRA EZP-22118 issue.
  • Edit block.ini and update the latest content block's limit values and set a bigger number than previously
    [LatestContent]
    NumberOfValidItems=10
    FetchFixedParameters[Limit]=10
    
  • If you have existing blocks experiencing the problem, you need to force the reload of their content : set to 0 the last_update in the database ezm_block table.
    For example if you want to update all of them run:
    update ezm_block set last_update = '0' where block_type = 'LatestContent';
    
  • Then run the cronjob:
    php runcronjobs.php ezflow
    
  • If too many items are displayed, you can override the template to fit your needs.

Ricardo Correia (28/11/2013 4:31 pm)

Sarah Haïm-Lubczanski (18/02/2014 3:01 pm)

Ricardo Correia, Sarah Haïm-Lubczanski


Comments

There are no comments.