I needed different views extending the same layout, what you want is
different layouts extended with the same view, right?
In the view something like?
{{if user_x:}}
{{extend 'user_x_view.html'}}
{{elif user_y:}}
{{extend 'user_y_view.html'}}
{{else:}}
{{extend 'user_z_view.html'}}
{{pass}}
Regards,
Annet.
On Oct 21, 4:28 pm, cjrh <[email protected]> wrote:
> On Oct 21, 4:05 pm, annet <[email protected]> wrote:
>
> > if auth.has_membership(group_id=user_x):
> > response.view='user_x_view.html'
> > if auth.has_membership(group_id=user_y):
> > response.view='user_y_view.html'
>
> Ok, but then would do you just keep copies of your view files around,
> save only for the line that specifies which specific "layout.html" is
> the one being extended? I would like to somehow have a single view
> file, e.g. index.html, but at runtime, depending on the logged-in
> user, change the line that says which layout.html must be extended.
>
> I guess I'll figure it out when I get there. Thanks for your comment.