[ beno]
[ beno]
I know one cannot nest DTML objects, but the below lets you know what I'm trying to accomplish. What is the correct syntax?
<dtml-let folder="<dtml-var id>">
<dtml-let folder=id>
That simple. Thanks. But I'm still not home free. Here's my code:
<dtml-let lang="REQUEST.get('HTTP_ACCEPT_LANGUAGE')"> <dtml-in objectValues> <dtml-let folder=id> <dtml-if expr="folder[2:]==lang[2:]"> <dtml-call "REQUEST.set('approved', '[lang]')"> <dtml-var approved> </dtml-if> </dtml-let> </dtml-in> </dtml-let>
It prints this: *[lang]*. I need it to print the value of the variable. How do I do that?
Sure, '[lang]' is just a string, so that is what it prints. The variable you created is lang, so you just write <dtml-call "REQUEST.set('approved', lang)"> BTW, I would simplify (just shorter and easier to read, not otherwise better) these lines: <dtml-let lang="REQUEST.get('HTTP_ACCEPT_LANGUAGE')"> <dtml-if expr="folder[2:]==lang[2:]"> to <dtml-let lang="REQUEST['HTTP_ACCEPT_LANGUAGE']"> <dtml-if "folder[2:]==lang[2:]"> Cheers, Tom P