On 15 Aug 2005, at 04:56, Bruce McKenzie wrote:
I'm having trouble making a cgi.popup_menu with option groups in TTK..
I've tried copying the examples from the the CGI.pm dox into TTK,
but I get all tangled up in brackets and braces, and I can't make
the optgroups appear.. Can someone point me to a properly fomatted
TTK example?
[%
USE q = CGI ;
FOREACH i = DBI.query( "SELECT * FROM section") ;
section.${i.section_id} = i.name ;
END ;
q.popup_menu({ Name => 'section_id'
Values => section.keys.nsort
Default => "${params.section_id}"
Labels => section } )
%]
Any good? I'm sure Andy or Darren will tidy it up. This stuff
forms the basis for my "TT used in a PHP stylee considered
crack-fuelled" talk.
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates