You need to sign in to do that
Don't have an account?

Hide search bar based on ProfileID in community
Hello I was trying to hide the search bar in the community based on the Id I have some Jquery that I am able to inject in the footer to get rid of the search bar but i am having problems doing it based on the profile Id.
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript">
/* Hide the top search box */
var j$ = jQuery.noConflict();
j$(document).ready(function(){
if('{!$User.Profile}' == 'Windstream Community User'){
j$("#phSearchContainer").hide();
}
});
</script>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript">
/* Hide the top search box */
var j$ = jQuery.noConflict();
j$(document).ready(function(){
if('{!$User.Profile}' == 'Windstream Community User'){
j$("#phSearchContainer").hide();
}
});
</script>
</body>
</html>
{!$Profile.Id}