changing attribute value

Author Message

Marko Žmak

Monday 21 March 2005 4:29:23 pm

How can I change the value of an attribute from some template?

I would like too make a template that each time when is loaded changes an attribute of some object. But without having to POST some data on some other page.

Is it possible?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Frederik Holljen

Wednesday 23 March 2005 1:38:20 am

this is not the way eZ publish is designed because caches mean that you don't know how often the code in the templates is actually run. However, you can set a template not to be cached which means that it will always be run (much slower though). You can quite easily make template operators that change data in the database.

Marko Žmak

Wednesday 23 March 2005 2:44:03 pm

Actually I was wondering if there's an existing eZ operator for that.

But If you say this is not the way to do it, maybe there's some other way to do what I need...

I need to increase a counter every time an image or article is loaded. So that I can track how many times it was viewed.

I already asked about it in the forum and got anwser to use the apache log. But the example I was given only shows how to get the "most popular" articles, not how to see how many times each one was viewed. How do I do that?

Also, what if I don't have acces to the apache log?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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