How to hide the Contributions page from My Activities? | Community
Skip to main content

How to hide the Contributions page from My Activities?

  • September 1, 2021
  • 2 replies
  • 0 views

Since we don't allow end users to post comments in our Help Center, I'd like to remove the Contributions tab from My Activities, but I can't find how to do this. 

I've tried via Javascript and CSS, but neither solution is very elegant and only "kinda" works.

2 replies

  • Author
  • September 1, 2021

Found the answer.

 

Since there isn't actually a My Activities page, this is easier to do than you might think!  What is linked to as "My Activities" is actually the Requests page (by default), which has links to the Contributions page (contributions_page.hbs) and the Following page (subscriptions_page.hbs).

So, to remove the Contributions tab from "My Activities", simply remove or comment out the link from two pages:

  • requests_page.hbs
  • subscriptions_page.hbs

The resulting code looks like this:

ul class="collapsible-nav-list">
<li class="current">
<a href="{{page_path 'requests'}}" aria-current="page">{{ t 'requests' }}</a>
</li>
{{!-- <li>{{link 'contributions'}}</li>--}}
<li>{{link 'subscriptions'}}</li>

Nicole17
  • October 22, 2021

Thanks for coming back and sharing your answer, John!