Thanks, Alessandro.
I'll check it out

León

On Dec 20, 9:31 pm, Alessandro Molina <[email protected]>
wrote:
> You can register two templates for the controller declaring a
> custom_format in expose and then switch between the two of them:
>
> from tg.decorators import use_custom_format
>
> @expose('default_template')
> @expose('special_case_template', custom_format='special_case')
> def method(self, *args, **kw):
>     if kg.get('special'):
>         use_custom_format(method, 'special_case')
>
> Didn't test the code, might be broken, but should give the idea.
>
>
>
>
>
>
>
> On Tue, Dec 20, 2011 at 6:44 PM, León Domingo <[email protected]> wrote:
> > Hi,
> > Is there any way to have only one index controller for the login and
> > the main page? I mean, i want to have an index that looks like a login
> > page when you're not logged in, and the main page when you're in. I
> > know that I can make a redirection but the thing is that I want the
> > url to be unaltered. Can I tell the template to use once I'm inside
> > the method controller besides the @expose('my.template') at the
> > beggining?
>
> > Thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "TurboGears" 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 
> > athttp://groups.google.com/group/turbogears?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to