Tuesday 11 November 2008 12:49:52 pm
Hi. We're working in a community site and we want "add to bookmark" links in every content. let's suppose we have articles and registered users could add this article (node) to their favourite links off the site. We have built a small extension for adding and removing from bookmarks. This extension uses
eZContentBrowseBookmark::createNew($userID,$nodeID,$nodeName);
for adding and
$bookmark=eZContentBrowseBookmark::fetch($bookmarkID);
$bookmark->remove();
for deleting. Ideally, when user use add to favourite link, bookmark should be added and the user will be redirected to the same article As user has added the node to bookmarks, the "add to bookmark" link needs to be changed by a "remove from bookmarks" link. But i don't really know if this is possible having viewcache enabled and not having
{set-block scope=root variable=cache_ttl}0{/set-block}
in the very top of the template. I mean. I would like to cache everything in the node/view/full/article.tpl template except the part for those add and remove from bookmarks link. Any ideas? Thank you.
|