On Thu, Aug 6, 2009 at 9:49 AM, Mladen Milankovic <[email protected]> wrote:
>
> Hi.
>
> Try:
>
> {{=IMG(_src=URL(r=request, c='static', f='Tux.jpg'))}}
>
> Everything you want to write out in the view, from python code needs =
> like: {{=variable}}
Yes ... this will make more sense for example if you want to do more
processing before outputting something, e.g.:
{{mylogo=IMG(_src=URL(r=request, c='static', f='Tux.jpg'))}}
{{ # more processing.... perhaps with mylogo...}}
{{ =mylogo <br> =title }}
Think of the empty left-side of the assignment as a "here" assignment (e.g.,
output)
>
> regards
> mmlado
>
> On Thursday 06 August 2009 16:36:11 Johann Spies wrote:
> > I am trying my first web2py page and I am wasting hours even after
> > watching several tutorial video's, reading the manual and the latest
> > version of cookbook2.pdf.
> >
> > After createing a new application, I want to to customize the menu and
> > put an image where the menu.py specifies:
> >
> >
> > response.title = request.application
> > response.subtitle = T('customize me!')
> >
> > I want to replace the "request.application" part with a logo which I
> > put amongst the static files.
> >
> > I have tried to modify layout.html as follows, but it ignores what I
> > am trying to do:
> >
> > <div class="wrapper">
> > <table class="layout">
> > <tr>
> > <td colspan="3" class="header">
> > <h1>
> > {{title=response.title or 'response.title'}}
> >
> > {{IMG(_src=URL(r=request, c='static', f='Tux.jpg'))}}
> > </h1>
> >
> > Please help me to waste less time.
> >
> > Regards
> > Johann
> >
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---