Skip to Content Skip to Menu

[SOLVED] Link Direct to Profile Tab

12 years 11 months ago - 12 years 1 month ago #181303 by spendracing
[SOLVED] Link Direct to Profile Tab was created by spendracing
I have a section within GroupJive and I wish to link directly to two tabs within the owner of the groupjive groups profile.

These will be direct from links I build into the pages

Any ideas how I can do this?

So this is the code which calls the link to the main profile of the owner but I would like it to go direct to one of the owners tabs -

( $row->user_id ? '<div>' . cbgjClass::getOverride( 'owner' ) . ': ' . $cbUser->getField( 'formatname', null, 'html', 'none', 'list' ) . '</div>' : null )

Many Thanks
Last edit: 12 years 1 month ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8280
  • Karma: 1443
12 years 11 months ago - 12 years 11 months ago #181334 by krileon
Replied by krileon on topic Re: Link Direct to Profile Tab
You can link to a tab by including &tab=TAB_ID_OR_TAB_NAME_OR_TAB_CLASS. It's best to use tab id. Example as follows.

index.php?option=com_comprofiler&tab=18

You can find tab id within CB > Tab Management in the far right column. You can't link to the nested tabs inside of the Groups tab however.

The formatname field generates all the HTML however and you won't be able to append the &tab parameter to the URL. You'll need to manually construct the HTML and then add the name inside of it using profile view (instead of list) of the formatname field (doesn't have HTML). The below API can generate the URL for you, including to a specific tab.
Code:
$_CB_framework->userProfileUrl( USER_ID, true, TAB_ID )


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.
Last edit: 12 years 11 months ago by krileon.

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

  • moomola
  • moomola
  • OFFLINE
  • Posts: 37
  • Thanks: 0
  • Karma: 0
12 years 1 month ago #210601 by moomola
Replied by moomola on topic Re: Link Direct to Profile Tab
Just in case that would be useful to someone else,
I'm also able to directly open a specific tab in
my profile once loged using this :

index.php/my-profile/userdetails?tab=25

---
Olivier

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

Moderators: beatnantkrileon
Powered by Kunena Forum