From: "Samy Beja" <samybeja@hotmail.com>
Thanks, my copy-paste did not work correctly but the issue was at the very first line ... I don't think Zope accepts that syntax for the object !!
What do you think about it !!
From: "Samy Beja" <samybeja@hotmail.com>
My Zclass is named PatternClass and the function that makes troubles is PatternClass_add. Here you are the code I put in it but, still with the syntax error.
#<HTML> #<HEAD><TITLE>Add PatternClass</TITLE></HEAD> #<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555"> #<dtml-with PatternClass.createInObjectManager(REQUEST [headLine],REQUEST) #<dtml-call "propertysheets.PatternDescription.manage_editProperties(REQUEST)"> #</dtml-with> #<dtml-if DestinationURL> #<dtml-call "RESPONSE.redirect(DestinationURL+?/manage_workspace?)"> #<dtml-else> #<dtml-call "RESPONSE.redirect(URL2+?/manage_workspace ?)"> #</dtml-if> #</body></html>
You are missing some quotations and a closing bracket in the first dtml call:
<dtml-with "PatternClass.createInObjectManager(REQUEST [headLine],REQUEST)">
Is headLine a variable whose contents you have set somewhere else? Or is headLine the name of the variable within the REQUEST block that you want to access? eg. if you did something like: <dtml-call "REQUEST.set('headLine', 'id123')"> (or if headLine is returned from a form) Then <dtml-var "REQUEST['headline']"> will display: id123 However: <dtml-var "REQUEST[headline]"> is a type of indirection, which means that the contents of REQUEST['headLine'] will be used to locate another variable with the REQUEST block. eg. <dtml-call "REQUEST.set('headLine', 'id123')"> <dtml-call "REQUEST.set('id123', 'xxx')"> <dtml-var "REQUEST[headline]"> will display: xxx HTH Jonathan