cache-block and custom node view

Author Message

laurent le cadet

Thursday 21 February 2008 1:57:53 am

Hi,

I did an override for folder depending on section :


[folder_annuaire_produits]
Source=node/view/full.tpl
MatchFile=full/annuaire_produits.tpl
Subdir=templates
Match[class_identifier]=folder
Match[section]=7

In this annuaire_produits.tpl, I fetch a tree of subfolders with products in them to print out a limited number of products sorted by published date (the very last new products) :

{def $products =   fetch('content','tree',hash( parent_node_id, $node.node_id,
                           'class_filter_type', 'include',
                           'class_filter_array', array('produit'),
                           'sort_by', array( 'published', false() ),
						   'limit', 9 ) )
				 
			}

{foreach $products as $product}
{node_view_gui view='embed' content_node=$product}
{/foreach}

At this point everything is ok...but not when there is a new product published in the subtree.
It doesn't appear in the last new product due to the standard cache mechanism.
I know there is a subtree cache function but I don't know how to write it.

I need some help.

Best reagrds.

Laurent

Maxime Thomas

Friday 22 February 2008 6:00:57 am

Hi,

You can set up eZ to automatically manage your cache with some specific content rules.
I think this article will be helpfull.

http://ez.no/doc/ez_publish/technical_manual/4_0/features/view_caching/smart_view_cache_cleaning

Cheers.

Max

Maxime Thomas
[email protected] | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.