I have this :

{{if request.args(0)=='login':}}
{{layoutPassed = 'login_layout.html'}}
{{=P(0)}}
{{else:}}
{{=P(1)}}
{{pass}}
{{pass}}

{{extend layoutPassed}}

{{=form}}

and I get :

Error traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.

Traceback (most recent call last):
  File "/web2py/gluon/main.py", line 425, in wsgibase
    serve_controller(request, response, session)
  File "/web2py/gluon/main.py", line 194, in serve_controller
    run_view_in(response._view_environment)
  File "/web2py/gluon/compileapp.py", line 471, in run_view_in
    context=environment)
  File "/web2py/gluon/template.py", line 821, in parse_template
    return str(TemplateParser(text, context=context, path=path,
lexers=lexers, delimiters=delimiters))
  File "/web2py/gluon/template.py", line 310, in __init__
    self.parse(text)
  File "/web2py/gluon/template.py", line 794, in parse
    self.extend(extend)
  File "/web2py/gluon/template.py", line 465, in extend
    text = self._get_file_text(filename)
  File "/web2py/gluon/template.py", line 428, in _get_file_text
    filename = eval(filename, self.context)
  File "<string>", line 1, in <module>
NameError: name 'layoutPassed' is not defined


Richard

On Wed, Nov 24, 2010 at 5:21 PM, Bruno Rocha <rochacbr...@gmail.com> wrote:

> You have to customize the user.html which receive 'login' as an argument in
> request.args, so you can control your behavior in user.html as:
>
> {{if 'login' in request.args:}}
>
> SOME HTML
>
> {{else:}}
>
> OTHER HTML
>
> {{pass}}
>
> 2010/11/24 Richard Vézina <ml.richard.vez...@gmail.com>
>
> Hello,
>>
>> Is there a way to have a particular layout for default/user/login that
>> will not affect ddefault/user/not_authorized for example?
>>
>> I try by adding a login.html in view without success.
>>
>> Thanks
>>
>> Richard
>>
>
>
>
> --
>
> Bruno Rocha
> http://about.me/rochacbruno/bio
>

Reply via email to