Re: "dynamic" dtml-with from string content

Niels Dettenbach <nd-ImmFMecdQhFWk0Htik3J/[email protected]>
Newsgroups gmane.comp.web.zope.general
Organization Syndicat IT&Internet
Message-ID <6198053.mvTxaPlD9K@gongo>
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/

_______________________________________________
Zope maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQIcBAABCAAGBQJPPmcPAAoJEM78prARigUnKa8P/AoYGAILscmu03mzHfzg8RNE
F4zAF64XwUW8XT2ElWMscnsrFUrDAkiK0XfhkWWITz3iw5pH3kdpIrQPxBexCm7I
im66XAbItdnFaPyac4oUYelkD67LJDMdfPXO6BK6p2x8Ar98K69g4B92Uo+yxZ9X
0+xo3XCSH+ity3L24x0Lenr5tHIfGjWfL7CSxZl4/0lX3FU72M81Ujy9VjhnsfEq
1lNEwmIamOkAuRUvjBtObS+AnkRm0Vn5Ajg/5sMbvUBGToeH+mqTYTJgQfBu+VmO
5ydu1K/VXZ+PWOT0zMpRpzzprdfuAfsRgXXG1Z8VAJRrz25IAMDdfp1j1Q2Fh6u7
kgTA/CMqF5jhDMSZ8o0XoOPN1YKVvvFsaLn0TUo3i1RhFdGCXa9j21P3U3g/psBO
cnvp7e1gDUJad9rm2eERd8eWnrop+AIgCe30WYV5FL7PSPc6ZlBtd/+CPhtnrdLM
JdFi8Pb4x11eE+N8HHrOIplPWzEwbXN9Rn+2uHQK9unWl7TF7TC98kNWldh2E/LT
1NS+5XLfztEPaGx2eLnY9o9W5gAVXdSZwwRm7Uf6aX8K+JVD1ezAQ9eJZRPl+iVr
zz+TebgS/X/Ekv63EVGOQrVG21R/QdTifkt8+CUwa2wLmQU8rp/T96lYfPyKJa21
TjMpm/UOWXXcopH7Q1sk
=BudV
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.