Worked like a charm ... so was supposed to use = instead of :

Does : pass a string and = a python object ?

Cheers
PK

On Monday, 29 October 2012 03:26:30 UTC+5:30, Andrey Kuzmin wrote:
>
> Try this:
>
>
> $var dropdown = data.dropdown
>
>
> On Monday, October 29, 2012 12:36:15 AM UTC+4, Dexter wrote:
>>
>> Hi
>>
>> I am currently using  a base template like
>>
>> render = web.template.render('templates/', base='layout')
>>
>> I would like to pass some arguments to layout.htm
>> I know this can be done as (http://webpy.org/cookbook/layout_template)
>>
>>
>> templates/index.htm
>>
>> ---------------------------------------
>> $var title: This is title.
>>
>> <h3>Hello, world</h3>
>> ---------------------------------------
>>
>> and access content.title in the layout page
>>
>>
>> My problem is I am trying to pass a form Dropdown object to index.htm and 
>> want that to be rendered in layout.htm
>>
>> I am not able to get it right can anyone plz help with the syntax
>>
>> My code
>>
>> templates/index.htm
>>
>> ---------------------------------------------
>> $def with (data)
>> $var title: Overview
>>
>> <br />
>>      
>> $var dropdown: $:data.dropdown
>>
>> ---------------------------------------------
>>
>>
>> templates/layout.htm
>>
>> ---------------------------------------------
>> $def with (content=None,)
>>
>>      $content.dropdown.render()
>> ---------------------------------------------
>>
>>
>> And this does not work
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/webpy/-/KzeCe6v-reIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to