Forums / Developer / How to update lists?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

How to update lists?

Author Message

Daniel Lopes

Friday 24 April 2009 10:00:44 am

I wrote the code below:

{def $my_list=fetch('content','list',
                             hash('parent_node_id',95,sort_by',array('modified',false()),
                             'attribute_filter',array(array('news/featured','=',1)), 
                             'class_filter_type', 'include', class_filter_array, array('news')))}

{foreach $my_list as $node}
  {attribute_view_gui attribute=$node.data_map.categoria}
  <a href="{$node.url|wash}">{attribute_view_gui attribute=$node.object.data_map.title}</a>
  <br />
             {$node.object.modified|l10n(shortdate)}
  <br />
{/foreach}

But the list does not update when I insert a new item and I refresh the page.
What can I do?

Regards,

Jani Tarvainen

Saturday 25 April 2009 10:47:49 pm

Sounds like a caching issue. Try setting off the view cache by inserting the following snippet on the first line of the template:

{set-block scope=global variable=cache_ttl}0{/set-block}

--
http://ezpublish.fi/

Daniel Lopes

Monday 27 April 2009 5:06:33 am

Thanks Jani,

You saved my life.

It´s ok now!

Jani Tarvainen

Tuesday 28 April 2009 9:55:26 am

Great to hear :)

Just remember that turning off View Caching takes its toll on performance. So if you run into trouble take a look at Smart View Cache Cleaning: http://ez.no/doc/ez_publish/technical_manual/4_0/features/view_caching/smart_view_cache_cleaning

--
http://ezpublish.fi/