how can I fix this?? ---------------- the main dtml file has the following line---------------------------- <dtml-var SomeVar> <!-- there is a valid namespace SomeVar and this line prints it out... --> <!-- the next line works fine with Number 5, but not if I substitute SomeVar instead of 5 --> <dtml-var "Some_Header(style=Some_Style_css(SomeKey=5))"> ---------------------------------------------------------------------------- --------------------- ---------------- the Some_header dtml file has the following lines------------- <style> <--! <dtml-var style> --!> </stile> ---------------------------------------------------------------------------- --------------------- ---------------- the Some_Style_css dtml file has the following lines---------- input { position: relative; font-size: <dtml-var SomeKey> } ---------------------------------------------------------------------------- ---------------------- Now the whole thing works great...... however, if I attempt to make NUMBER 5 by any variable from REQUEST or the current form the KeyError comes up ::::::::: if instead of 5 I put SomeVar (which was passed to this dtml from some other form) I get "Error Type: KeyError Error Value: SomeVar"
danchik wrote:
how can I fix this??
<dtml-var SomeVar> <!-- there is a valid namespace SomeVar and this line prints it out... --> <!-- the next line works fine with Number 5, but not if I substitute SomeVar instead of 5 --> <dtml-var "Some_Header(style=Some_Style_css(SomeKey=5))">
The wrapping makes it very hard to read. I don't believe you need to do this. With these changes:
---------------- the Some_header dtml file has the following lines------------- <style> <--! <dtml-var "_.getitem(style)"> --!> </stile>
---------------- the Some_Style_css dtml file has the following lines---------- input { position: relative;
font-size: <dtml-var SomeKey> }
You can do this much more simply as long as Some_Style and Some_header are methods, and style and SomeKey are in REQUEST: <dtml-var Some_header> Then Some_header will have Some_style passed to it in the request, and SomeKey will come from REQUEST too. Hope that helps, -- ethan mindlace fremen Zopatista Community Liason Abnegate I!
participants (2)
-
danchik -
ethan mindlace fremen