Share » Forums » Developer » Clearing cache after changing...

Clearing cache after changing priority [solved]

Clearing cache after changing priority [solved]

Wednesday 21 March 2007 9:51:36 am - 3 replies

Modified on Wednesday 21 March 2007 10:53:49 am by Atle Pedersen

Author Message

Kristian Hole

Wednesday 21 March 2007 9:58:23 am

Hi Atle,

If the viewcache is configured properly it should clear the viewcache when you are changing priorities.

If you are doing it from PHP, then you might need to use eZContentCacheManager::clearObjectViewCache to clear the view cache for your object.

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Atle Pedersen

Wednesday 21 March 2007 10:15:28 am

I'm trying to do this from a template using the following html and template code:

<form  method="post" action={"/content/action"|ezurl}>
<input type="text" name="Priority[]" size="3" value="{$person.priority}" title="" />
<input type="hidden" name="PriorityID[]" value="{$person.node_id}" />
<input type="hidden" name="ContentNodeID" value='{$listenid}' />
<input type="hidden" name="redirecthack" value="{$node.url_alias}" />
<input type="hidden" name="ContentObjectID" value='{$objecth[$listenid]}' />
<input type="submit" name="UpdatePriorityButton" value="Endre prioritet" title="Høyere prioritet vises tidligere" />
</form>
 

$listenid is a node id and $objecth[$listenid] is the objectid of the same node.

Atle Pedersen

Wednesday 21 March 2007 10:53:33 am

Ahh.. you put me on the right track, Kristian. Thanks.

I read the source code and found that ContentObjectID is used for clearing cache. So it was a matter of changing this variable.

<input type="hidden" name="ContentObjectID" value='{$node.object.id}' />

That was definitely the end of work for today. :)

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu