Is it possible to do macro like construct? I got a list of folders : events, activities, news, etc Which I need to list the items in each of these in sequence, I would like to do : <dtml-in "['events', 'activities', 'news']"> <dtml-with "sequence-item"> <dtml-var list-items missing> </dtml-with> </dtml-in> Rgs, Kent Sin
I got a list of folders : events, activities, news, etc
Which I need to list the items in each of these in sequence, I would like to do :
<dtml-in "['events', 'activities', 'news']"> <dtml-with "sequence-item"> <dtml-var list-items missing> </dtml-with> </dtml-in>
The method you are looking for is objectValues(). Look into ZQR for the specifics. Here the code you want (Yes, I actually tested it): <dtml-var standard_html_header> <dtml-in "['events', 'activities', 'news']"> <dtml-let x=sequence-item> <dtml-in "_[x].objectValues()"> <dtml-var id> </dtml-in> </dtml-let> </dtml-in> <dtml-var standard_html_footer> Regards, Stephan -- Stephan Richter - (901) 573-3308 - srichter@cbu.edu CBU - Physics & Chemistry; Framework Web - Web Design & Development PGP Key: 735E C61E 5C64 F430 4F9C 798E DCA2 07E3 E42B 5391
Sin Hang Kin:
<dtml-in "['events', 'activities', 'news']"> <dtml-with "sequence-item"> <dtml-var list-items missing> </dtml-with> </dtml-in>
Try (untested) <dtml-in "['events', 'activities', 'news']"> <dtml-with "_[_['sequence-item']]"> <dtml-var list-items missing> </dtml-with> </dtml-in> All my best, Jason Spisak CIO HireTechs.com 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
participants (3)
-
Jason Spisak -
Sin Hang Kin -
Stephan Richter