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. 31)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Module: Conditional Menu (CB-Integrated)

  • cambler
  • cambler
  • OFFLINE
  • Posts: 19
  • Thanks: 0
  • Karma: 0
15 years 5 months ago #103484 by cambler
Replied by cambler on topic Re:Module: Conditional Menu (CB-Integrated)
danathomas76 wrote:

I did finally get this wrong. I had used the name wrong. Also, with existing users, if you add a menu and by default it is not selected, for some reason the existing users would see the menu until I clicked save in their profile.


Exactly - the second issue is because the field has no value when created, for existing users. This is a bug in CB, in my opinion. When creating a new field, if a default value is given, CB should also set that value for all users when creating the field.

Me, I usually go directly into SQL and do an "UPDATE #__comprofiler SET fieldname=value" to set everyone's value after creating the field.

Like I said, this is a hack, at best, to achieve the functionality until Joomla 1.6 is available.

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

15 years 5 months ago #103485 by danathomas76
Replied by danathomas76 on topic Re:Module: Conditional Menu (CB-Integrated)
I loved this ability. The company I used this with loved it too, until they laid me off. Oh well. They are still using it. Thanks for doing it.

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

  • cambler
  • cambler
  • OFFLINE
  • Posts: 19
  • Thanks: 0
  • Karma: 0
15 years 5 months ago #103486 by cambler
Replied by cambler on topic Re:Module: Conditional Menu (CB-Integrated)
danathomas76 wrote:

I loved this ability. The company I used this with loved it too, until they laid me off. Oh well. They are still using it. Thanks for doing it.


Ouch! That sucks!

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

  • rbaker
  • rbaker
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
15 years 5 months ago #103544 by rbaker
Replied by rbaker on topic Re:Module: Conditional Menu (CB-Integrated)
Could one of you that has got it working please tell me where I'm going wrong? Apologies if it's long-winded...

Starting from the start, I install the module and it creates an entry in the Module of type mod_cbcmenu, I give it a Title, in this example "Test". I then go through to the CB Master Switch field, in there I put something, for example "CBMSField".

I already have a menu called "mainmenu" that has items on it. Do I now use the drop down menu for Menu Name and select "mainmenu" to make my already created menu Conditional?

For arguments sake, I have selected that. I change the radio button that says 'Hide menu from Guest' from No to Yes as I don't want this menu to show up unless someone logs in. All the other settings I have left.

At this point I save that and test it out, the Main Menu still shows.

I continue on anyway and create a field in Community Builder. Create field, Check Box (Single), in the name I put cbcmCBMSField, which changes to cb_cbcmCBMSField when I go to the next field. Give it a Title "Test CB", then leave all other settings and hit Save.

I then go to my test user, and make sure it is NOT ticked as I want to make it not show up as it is currently showing up no matter what I do. It is unticked, so I hit Save. Log in using that test account, and the menu is still there.

Is there something I'm not doing right up to this point?

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

  • cambler
  • cambler
  • OFFLINE
  • Posts: 19
  • Thanks: 0
  • Karma: 0
15 years 5 months ago #103545 by cambler
Replied by cambler on topic Re:Module: Conditional Menu (CB-Integrated)
Two things. First, don't use the master switch, as you've not said you need it.

Second, I note that you didn't mention that you'd properly set the alias in your menu to correspond with the CB field.

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

  • rbaker
  • rbaker
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
15 years 5 months ago #104949 by rbaker
Replied by rbaker on topic Re:Module: Conditional Menu (CB-Integrated)
Ok, I've removed the text in the master switch field and deleted that field in Community Builder.

You say I didn't mention about assigning the alias to the menu. Where do I do that? Do I have to go into Menu Manager and create a new menu? Cause when I do that, it puts a new entry in the module manager and the type isn't mod_cbmenu it's mod_mainmenu. Nowhere in the existing one or in that new one does it have anything for an alias.

When I know where to put an alias in, then I can create a field for it in Community Builder to correspond with it.

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

Moderators: beatnantkrileon
Powered by Kunena Forum