None returned from manage_edit
<dtml-var "myDTML_Method.manage_edit(data, title)"> returns 'None'. It saves content correctly, but why is "None" displayed? And how do I stop it from displaying? 2-fer: What is the syntax to replace myDTML_Method with its id? <dtml-var "id.manage_edit(data, title)"> gives me an AttributeError/class Cachable has no attribute "namemanage_edit". I tested and <dtml-var id> displays the correct value, but how do I call the object via a property using id with manage_edit? TFTH, Trevor
1)Try using dtml-call instead of dtml-var 2)Just a guess: <dtml-call expr="_[id].manage_edit(data, title)"> I'm assuming you are using this inside a <dtml-in> or a <dtml-with> ??? It looks to me like you should be using a python script for this. I have to keep reminding myself, "Separate code from content." Troy Trevor Toenjes wrote:
<dtml-var "myDTML_Method.manage_edit(data, title)"> returns 'None'. It saves content correctly, but why is "None" displayed? And how do I stop it from displaying?
2-fer: What is the syntax to replace myDTML_Method with its id? <dtml-var "id.manage_edit(data, title)"> gives me an AttributeError/class Cachable has no attribute "namemanage_edit". I tested and <dtml-var id> displays the correct value, but how do I call the object via a property using id with manage_edit?
TFTH, Trevor
<dtml-with id><dtml-call "manage_edit(data, title)"></dtml-with> was the answer. hmmm...what syntax eliminates the -with? "_[id].manage_edit(data, title)" doesnt work. Thanks for knocking this loose. I was staring at it for too long.
It looks to me like you should be using a python script for this. I have to keep reminding myself, "Separate code from content." This is just an edit_DTML_WYSIWYG method that allows authorized users to edit 'data' of another object (the id) via a webform using IE's HTML editor.
Thanks again, Trevor
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
<dtml-var "myDTML_Method.manage_edit(data, title)"> returns 'None'. It saves content correctly, but why is "None" displayed? And how do I stop it from displaying?
use dtml-call instead of dtml-var
2-fer: What is the syntax to replace myDTML_Method with its id? <dtml-var "id.manage_edit(data, title)"> gives me an AttributeError/class Cachable has no attribute "namemanage_edit". I tested and <dtml-var id> displays the correct value, but how do I call the object via a property using id with manage_edit?
<dtml-var "_[id].manage_edit(data, title)"> regards Max M
participants (3)
-
Max M -
Trevor Toenjes -
Troy Farrell