setContent() does not work as expected

setContent() does not work as expected

Friday 30 April 2004 12:33:38 pm - 3 replies

Author Message

Paul Forsyth

Saturday 01 May 2004 6:34:43 am

Have a look on this thread for the examples you need:

http://ez.no/community/forum/developer/importing_update_entry_if_it_already_exists

paul

--
http://www.visionwt.com

Áncor González

Sunday 02 May 2004 5:21:05 am

I already supossed that using setAttribute("data_text",$my_string) should work but...
It's not a job that should be done by setContent() itself?
I see the use of setAttribute("data_text",$my_string) as a workaround, a temporary solution, a patch because setContent() does not work as it should. But maybe I'm wrong and I have not understood the real meaning of setContent().

Anyway, thank you very much for your help, you saved my life.

Paul Forsyth

Sunday 02 May 2004 3:10:25 pm

I think setContent actually retreives values from the db, ready for the template to use, and setAttribute goes in the other direction and enters values into the right variables for the store() command to actually commit the change to the db.

It is subtle difference and needs to be better documented.

paul

--
http://www.visionwt.com

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

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