hey thanks worked like a dream *cheers
On Wed, Jun 29, 2011 at 10:35 PM, Bruno Rocha <[email protected]> wrote: > I did this for web2py.com using request.function, I created a function > tooggle_class which receives request.function and do this job. > > here is an example that I use in http://CursoDePython.com.br > > The code > https://gist.github.com/1055688 > > > > On Wed, Jun 29, 2011 at 5:16 PM, ADE <[email protected]> wrote: > >> Hello I am trying to figure out how to check if the current page is >> active in web2py >> >> I have my navigation as follows >> >> <ul> >> <li><a href="{{=URL('default', 'index')}}">Home</a></li> >> <li><a href="{{=URL('view', 'schedule')}}">What's On</a></ >> li> >> <li><a href="{{=URL('default', 'about')}}">About PSTV</a></ >> li> >> <li><a href="{{=URL('blog', 'index')}}">Blog</a></li> >> <li><a href="{{=URL('view', 'categories')}}">Episodes</a></ >> li> >> <li><a href="{{=URL('view', 'trailers')}}">Trailers</a></ >> li> >> <li><a href="http://shop.pstv.tv">Shop</a></li> >> <li><a href="{{=URL('default', 'contact')}}">Contact Us</ >> a></li> >> </ul> >> >> if the current page is active I would like to set <li> to <li >> class="selected"> >> >> Any ideas how to do this >> >> *cheers >> >> > > > -- > > > > -- > Bruno Rocha > [ About me: http://zerp.ly/rochacbruno ] > [ Aprenda a programar: http://CursoDePython.com.br ] > [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ] > [ Consultoria em desenvolvimento web: http://www.blouweb.com ] > >

