Forum Discussion

Bill_S's avatar
Bill_S
Expert
12 years ago
Solved

Need to remove sign in link from mobile site once user is signed in

I found the post talking about replacing the "Sign In" link on the mobile home page with a "Sign Out" link.  I just wanted to know how to simply remove the Sign In link once the user is signed in.  Would it be...? 

 

<#if user.anonymous == true>
 <a href="${webUi.getUserLoginPageUrl("/")}">Sign in</a>
<#else>
 
</#if>

 

And since we had to change the standard SSO sign in page with a mobile version, can I replace the variable link with...?

 

<#if user.anonymous == true>
<a href=http://ourcustommobilesigninpagelink/>Sign in</a>
<#else>

</#if>

 

Finally, do I just include this in my custom compent for it to work?

 

Thanks

  • The code sample you specified should work. As for your second question, which sign in link were you looking to replace? Once you put this code in a custom component, you will have to replace the "sign in" link component with your custom component (on the page where you want this change reflected).

     

    Let me know if you need more help!

3 Replies

  • VenkS's avatar
    VenkS
    Lithium Alumni (Retired)
    12 years ago

    The code sample you specified should work. As for your second question, which sign in link were you looking to replace? Once you put this code in a custom component, you will have to replace the "sign in" link component with your custom component (on the page where you want this change reflected).

     

    Let me know if you need more help!

  • Bill_S's avatar
    Bill_S
    Expert
    12 years ago

    It worked perfectly.  As a matter of fact, I was able to use it to change the sign out as well. 

     

    By the way, what programming language is that?  Also, I am having problems getting the cookie cleared, so that I can sign back in to mobile without getting a default page that Salesforce assigns.  Is there any specific language I can add to the sign out that would help clear the session cookie?

     

    Thanks.

  • VenkS's avatar
    VenkS
    Lithium Alumni (Retired)
    12 years ago

    The language is FreeMarker. We provide additional freemarker objects that allow access to Lithium specific objects. Here is a link to where you can get the most recently updated list of objects:

    http://lithosphere.lithium.com/t5/developers-knowledge-base/Writing-custom-components-in-Lithium-Studio/ta-p/9217

     

    And here is a link to a Freemarker Manual:

    http://freemarker.sourceforge.net/docs/dgui_template_exp.html

     

    As for your question, the cookie would be device/application specific, so signing in from the different device should use a different cookie. Could you explain what you are trying to do in more detail?