I'm using the Signout button webpart which works great. The issue I am having is since I added a login and registration link to my navbar I'm not quite sure how to hide those when a user is logged in. I attempted to do javascript but can't seem to return if the user is logged in, any ideas?this is my navbar
or you can view it here https://imgur.com/pHFF4Crthe javascript code I am trying to do to hide the login and contact button looks like this;$(document).ready(function(){
var is_user_logged_in = @% CMS.CMSHelper.SessionManager.GetUserId() %@
if(is_user_logged_in)
{
document.getElementById('.user-auth').hide();
}
});
and it keeps saying I need a ';' after the CMS part.
↧