Hey Peps

Try this
            var currView = gadgets.views.getCurrentView().getName();
                if (currView)
                {
                    if (currView == "canvas")
                    { ; }
                    else if (currView == "profile")
                    { ; }
                    else
                    { ; }
                }
And remember, before you can do this..
you would have to add <Require feature="views"/> in your moduleprefs 
section.
All the best.


peps wrote:
> Hi,
> I'm pretty much a beginner in opensocial-applications so I have a
> beginners question:
>
> How to use
> gadgets.views.getCurrentView()
> and
> gadgets.views.requestNavigateTo(view)
> to make the application display the correct content depending if the
> user is in canvas or profile page..?
>
> Would something like this work? (i can't get to the orkut sandbox yet
> so can't really test it..)
>
> if ( gadgets.views.getCurrentView() == "canvas" ){
>   // canvas code here
> }
> else{
>   // profile code here
> }
>
> Thank you for any replies,
> p
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" 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/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to