Hi, Finally, for printing my index_html method, I use the read_raw() method. but I still have a problem: <dtml-in "objectItems('DTML Method')" sort=id> <dtml-if "id == index_html"> <dtml-var "read_raw()" html_quote> </dtml-if> ... </dtml-if> ...... ...... </dtml-in> As u can see, I want to test if the methods I extract from the methods that exists have special names, to treat it in different manners. Problems is that the <dtml-if "id == index_html"> test does not seem to work.... It can sound a very simple syntax question, but how can I test the method name??? I tried the tag <dtml-var id> which gave me the good method names... Can u help me??? Thanks a lot Pierre
On 02-May-2000 Pierre Rougier wrote:
<dtml-in "objectItems('DTML Method')" sort=id> <dtml-if "id == index_html"> <dtml-var "read_raw()" html_quote> </dtml-if> </dtml-in>
As u can see, I want to test if the methods I extract from the methods that exists have special names, to treat it in different manners. Problems is that the <dtml-if "id == index_html"> test does not seem to work.... It can sound a very simple syntax question, but how can I test the method name???
Using <dtml-if "id = 'index_html'"> should work. Have to make sure you are comparing the id to a string value. -- M. Adam Kendall | Got Linux? Internetworking & | We do. Security Architect | akendall@devis.com | http://www.devis.com
about dtml-in ???
On 02-May-2000 Pierre Rougier wrote:
<dtml-in "objectItems('DTML Method')" sort=id> <dtml-if "id == index_html"> <dtml-var "read_raw()" html_quote> </dtml-if> </dtml-in>
I found, it was just <dtml-if "id() == index_html">, but now, I have a big big problem, I changed a permission in the DefindPermission Screen (Change DTML Methods to "Change DTML-Methods instead of (disabled)), and now, I can't do anything in my Zope environment, anytime I try to access something, the following error is written: Zope Error Zope has encountered an error while publishing this resource. Error Type: Error Error Value: Incorrect padding Traceback (innermost last): File /home/prougier/zope/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /home/prougier/zope/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 179, in publish File /home/prougier/zope/Zope-2.1.4-linux2-x86/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ElementWithAttributes) File /home/prougier/zope/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 151, in publish File /home/prougier/zope/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/BaseRequest.py, line 430, in traverse File /home/prougier/zope/Zope-2.1.4-linux2-x86/lib/python/AccessControl/User.py, line 402, in validate (Object: RoleManager) File /home/prougier/zope/Zope-2.1.4-linux2-x86/lib/python1.5/base64.py, line 46, in decodestring File /home/prougier/zope/Zope-2.1.4-linux2-x86/lib/python1.5/base64.py, line 32, in decode Error: (see above) So, I can not do anything to repair..... do you see how I can resolve it? It is a big big big big problem :-(( Thank you!
Try the following to see if you get anything at all. <dtml-var "objectItems()"> for some reason, when I do it, it returns nothing. If it returns anything at all,it should render it. like <dtml-var "objectMap()"> does. good luck. On Tue, 02 May 2000, you wrote:
On 02-May-2000 Pierre Rougier wrote:
<dtml-in "objectItems('DTML Method')" sort=id> <dtml-if "id == index_html"> <dtml-var "read_raw()" html_quote> </dtml-if> </dtml-in>
As u can see, I want to test if the methods I extract from the methods that exists have special names, to treat it in different manners. Problems is that the <dtml-if "id == index_html"> test does not seem to work.... It can sound a very simple syntax question, but how can I test the method name???
Using <dtml-if "id = 'index_html'"> should work. Have to make sure you are comparing the id to a string value.
-- M. Adam Kendall | Got Linux? Internetworking & | We do. Security Architect | akendall@devis.com | http://www.devis.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) -- ======================================================
Luis Cortes Pollak EPD (915) 621-6113 ======================================================
Okay, I have some more insight, I hope you are not trying to do this in index_html -- it won't work. Try a dtmlMethod The other point is the syntax, which should be something like: <dtml-in "objectItems(['File'])"> <dtml-var sequence-key> </dtml-in> Notice the list in the (). Have Fun, Luis.
participants (3)
-
Luis Cortes -
M. Adam Kendall -
Pierre Rougier