Skip to Content Skip to Menu

[#6505] unwanted user level in profile view breadcrumbs

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 9 months ago #291526 by krileon
I would create a Joomla menu item to CBs profile page then title it Profiles (menu title should be what shows in the breadcrumb) then you'd have the following.

Home / About NCADD / Our Affiliates / Profiles / NCADD, Juneau Affiliate

Then use CB Auto Actions as suggested above to redirect users back to your userlist in the event they click Profiles. I've added a feature ticket to look into this further as I agree it doesn't make much sense for users to be able to click to the my profile end point in breadcrumbs when they're not logged in as it'd be a known situation resulting in an empty page.

We don't have much control over this though since Joomla just builds the breadcrumb path from menu structure. We do have a pathway API usage through our foundation global, but CB it self is only adding the username (so just NCADD, Juneau Affiliate).

I believe you can use Joomla API to actually empty the pathway then set it to whatever you like. You could do that using a Code action on the onAfterUserProfileDisplay trigger with Method set to PHP. Another option maybe to just try and hide it with CSS. The below seams to work on Joomla protostar, but unsure if it will on other templates if they override the breadcrumb module layout.

Code:
.breadcrumb a.pathway[href*="&view=userprofile"], .breadcrumb a.pathway[href*="&view=userprofile"] + .divider { display: none; }

Note the above href attribute check was with SEF off. It'll likely need to be adjusted to check for the URL to be to a profile with SEF on so probably the below.

Code:
.breadcrumb a.pathway[href*="/profile/"], .breadcrumb a.pathway[href*="/profile/"] + .divider { 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.

Moderators: beatnantkrileon
Powered by Kunena Forum