[Zope] "dynamic" dtml-with from string content

Niels Dettenbach nd at syndicat.com
Fri Feb 17 14:41:13 UTC 2012


Am Freitag, 17. Februar 2012, 15:15:23 schrieben Sie:
> varx = 'this is the text"
> <dtml-var "_['varx']"> = <dtml-var varx> = 'this is the text"
> 
> varxx = 'varxy'
> <dtml-var "_[varxy]"> = <dtml-var varx> = 'this is the text"
> 
> my_class_path is i.e. "folder1.folder_sub"
> 
> so:
> 
>  <dtml-with "_[_.string.split(my_class_path, '.')[0]]">
>  <dtml-with "_[_.string.split(my_class_path, '.')[1]]">
> ......your code
> </dtml-with>
> </dtml-with>

This is very nice too - thanx! ;)

best regards,


Niels.


-- 
---
Niels Dettenbach
Syndicat IT&Internet
http://www.syndicat.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.zope.org/pipermail/zope/attachments/20120217/4b96f046/attachment.sig>


More information about the Zope mailing list