Hi, thanks for your comment !! I know about not beeing allowed to access attributes that start with "_". Actually what is intended here is for _[titulo] to be evaluated to the name of a folder, the one that has just been created by the manage_addDTMLDocument call (which worked fine)with the name specified by the user in a form field. <dtml-call "company.noticias.manage_addDTMLDocument(titulo,subtitulo,texto)"> <dtml-with "company.noticias._[titulo]"> <dtml-call "propertysheets.manage_addProperty('link',resumen,'text')" > </dtml-with> The variable "titulo" comes from a form that calls itself so, I expected company.noticias._[titulo] to be evaluated say as "company.noticias.january" assuming the user entered "january" on the form. Nevertheless, on my alternative coding, _[titulo] evaluated correctly, it's a pity such a large coding had to be made, even introducing an "un-necesary" loop-search and an "if" test, to accomplish what seemed trivial the way I exposed in the first place...unless I am missing something..... <dtml-call "company.noticias.manage_addDTMLDocument(titulo,subtitulo,texto)"> <dtml-with "company.noticias"> <dtml-in objectValues> <dtml-in propertyValues> <dtml-if "id() == _[titulo]"> <dtml-with id> <dtml-call "propertysheets.manage_addProperty('link',resumen,'text')"
</dtml-with> </dtml-if> Any comments.? Thanks and regards. Felipe Barousse Dieter Maurer wrote:
Trying to do a simple thing as creating a document and then adding a property with an DTML method, found that the following code does not work, it comes up with a password request (all security settings are at defaults):
<dtml-call "company.noticias.manage_addDTMLDocument(titulo,subtitulo,texto)"> <dtml-with "company.noticias._[titulo]"> <dtml-call "propertysheets.manage_addProperty('link',resumen,'text')" > </dtml-with>
Try <dtml-with "_.getattr(company.noticias,_[titulo])">
In DTML, you are not allowed to access any attribute starting with "_". And in fact, "_" is not even an attribute of "company.noticias".
Dieter