anusha(salesforce developer)

Thursday, 21 July 2016


To HIDE THE GLOBAL SEARCH BAR ON THE SALESFORCE COMMUNITY BUILDER HEADER


If you are using the Napili template in Salesforce’s Community Builder, you know that they create a pretty standard header for your site that includes your company logo, the global search bar, and a navigation widget.  You can choose in Settings to hide the entire header all together (if you want to make your own), however, there’s no option to remove individual components.
Here’s how you can hide the global search bar and the navigation widget from the view:
From the Community Builder, click on the Pencil icon next to “Branding Editor” at the top of the sidebar.
Screen Shot 2016-02-24 at 8.13.06 AM.png

In the Edit Custom CSS window, enter the following:
.body-search{
    display:none;
}

.selfServiceProfileMenu{
    display:none;
}


Click Save and go back to your builder to see the elements removed from the page.
It’s important to note that this isn’t best practice since we’re overriding standard Salesforce classes, however if you don’t want to get involved in creating a custom Lightning Component to replace your standard header (which will be covered in another post), this is a quick and easy option.

No comments:

Post a Comment