Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] Removing items from CB Menu

  • startup
  • startup
  • OFFLINE
  • Posts: 113
  • Thanks: 7
  • Karma: 1
  • Add-ons
9 years 10 months ago - 9 years 10 months ago #258136 by startup
[SOLVED] Removing items from CB Menu was created by startup
Hello!

Browsing my own user profile the CB Menu shows the following items:
Update Your Profile
Manage Your Connections

Browsing someone elses profile it shows:
View Your Profile
Send Private Message
Manage Your Connections
Add Connection
Update Your Profile

Is it possible to remove "View Your Profile" and "Update Your Profile" from the menu list if the user is browsing someone elses profile?

Cheers
Frank
Last edit: 9 years 10 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 years 10 months ago #258160 by krileon
Replied by krileon on topic Removing items from CB Menu
Those are hardcoded menu items. We currently don't have a UI to control their display. The only way to hide them is to use CSS and hide their element. The below CSS should hide the two menu items you're wanting to remove.

Code:
.cbMenu_UE_MENU_EDIT, .cbMenu_UE_MENU_VIEW { display: none !important; }

The problem however is it's going to hide those on your profile too. So the best way to hide them on just other users profiles is to use CB Auto Action and the before or after profile display trigger with a Code action to add the CSS conditionally. You'd check that the profile user id does not match the viewing users user id using the below condition.

[user_id] Not Equal To [cb:userdata field="user_id" user="#me" /]


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.
The following user(s) said Thank You: startup

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

  • startup
  • startup
  • OFFLINE
  • Posts: 113
  • Thanks: 7
  • Karma: 1
  • Add-ons
9 years 10 months ago #258180 by startup
Replied by startup on topic SOLVED: Removing items from CB Menu
Hi Krileon,

CB Auto Action is really the swiss army knife tool.

Your trick works like a charme. Ticket solved.

Thanks
Frank

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

Moderators: beatnantkrileon
Powered by Kunena Forum