Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Is it possible to Remove an Item from CB Menu

  • Vero-ecm
  • Vero-ecm
  • OFFLINE
  • Posts: 20
  • Thanks: 0
  • Karma: 0
10 years 11 months ago - 10 years 11 months ago #236641 by Vero-ecm
Hello,

Is it possible to Remove an Item from CB Menu (example : Connections - Manage your connection when you are on another user profile)?

Thanks
Last edit: 10 years 11 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
10 years 11 months ago #236674 by krileon
Replied by krileon on topic Is it possible to Remove an Item from CB Menu
No, not without using API to parse through the menu item array or using CSS to hide it. To hide it with CSS you can use the below, but it's going to hide it everywhere regardless of who profile you're viewing.

Code:
.cbMenu_UE_MENU_MANAGEMYCONNECTIONS { display: none; }


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • Vero-ecm
  • Vero-ecm
  • OFFLINE
  • Posts: 20
  • Thanks: 0
  • Karma: 0
10 years 11 months ago #236731 by Vero-ecm
Replied by Vero-ecm on topic Is it possible to Remove an Item from CB Menu
Ok
Thanks
Best regards

Please Log in or Create an account to join the conversation.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
10 years 11 months ago #236739 by fribse2011
Replied by fribse2011 on topic Is it possible to Remove an Item from CB Menu
Could an autoaction maybe help out there, and let the auto action only fire when it's not your own profile?

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in or Create an account to join the conversation.

  • Vero-ecm
  • Vero-ecm
  • OFFLINE
  • Posts: 20
  • Thanks: 0
  • Karma: 0
10 years 11 months ago #236742 by Vero-ecm
Replied by Vero-ecm on topic Is it possible to Remove an Item from CB Menu
Hi Fribse2011,

Could you develop it with more détails please.
Thanks

Please Log in or Create an account to join the conversation.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
10 years 11 months ago #236763 by fribse2011
Replied by fribse2011 on topic Is it possible to Remove an Item from CB Menu
I can try, you want it to hide an item on the profile, so the action should be one that fires the CSS, ie. it's a 'code' autoaction.
As it's on the profile we should use the trigger: BeforeProfileDisplay (not sure if also onBeforeUserProfileRequest should be there).
We want it to work for 'Everybody'.

The method is CSS inline, and it's of course the CSS from above:
.cbMenu_UE_MENU_MANAGEMYCONNECTIONS {display: none;}
Though I don't see it doing anything on 'other users' profiles?

The tricky part is only making it work for other people than the logged in person, I would suggest a filter like
[user_id] Not Equal To [cb:userdata field="user_id" user="#me" /]
But there is the problem, I'm not sure if that will work in the autoaction.

I haven't tested this, and I'm not sure if it does what is needed.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum