Technology Cares

Not Just another weblog

Posts Tagged ‘chatter’

Collapsed Chatter Feed in Home page

Posted by Manish on February 13, 2012

When we enable chatter in Salesforce, the Chatter Feed section always appears in Home page of the logged in user and it is always expanded. Not everybody want to have that in the way it is. For example one of my requirement was:
Req1: Hide Chatter Feed in Home page for users belonging to Profile 1
Req2: Show Chatter Feed (which should initially be collapsed) for users belonging to Profile 2

To resolve this issue, I created two Layouts and assigned to respective profiles
Layout 1 for Profile 1 and
Layout 2 for Profile 2

Now for Req1, I created a Homepage component HPComponent1 of type HTML Area and added following code to it

<br><script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js&#8221; type=”text/javascript”></script><script type=”text/javascript”>$j = jQuery.noConflict();$j(‘.chatterfeedshell’).parent().remove();</script>

Then, I edited Layout 1 and checked the check box for HPComponent1.

And for Req2, I created a Homepage component HPComponent2 of type HTML Area and added following code to it

<br><script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js&#8221; type=”text/javascript”></script><script type=”text/javascript”>$j = jQuery.noConflict();$j(‘.chatterexpando’).hide();$j(‘.showFeedLink’).show();$j(‘.hideFeedLink’).hide();</script>

Again, I edited Layout 2 and checked the check box for HPComponent2.

That was it. Requirement Fulfilled !

Posted in Uncategorized | Tagged: , | Leave a Comment »