Skip to Content Skip to Menu

CB Layout Manager — multiple layouts within Custom field + conditional support?

  • mjl1817
  • mjl1817
  • ONLINE
  • Posts: 55
  • Thanks: 7
  • Karma: 1
1 month 2 weeks ago #344396 by mjl1817
Subject:

Hi,

I'm working with Community Builder's Layout Manager (the plugin controlling Profile View/Edit canvas structure, not CB Template Changer) and have a few questions about its capabilities:

Multiple layouts within a single Custom Layout box: Each of the four views (Profile View Home, Profile View Other, Profile Edit, Registration) has one Custom Layout field. Is it possible to store more than one layout variant within that single field — for example, using conditional logic so that a stored value determines which of several layout variants renders — or am I limited to exactly one layout per view, with no way to switch between multiple saved options within that same field?
User-selectable layout switching: If multiple layout variants can be stored and conditionally selected as described above, is there a way to let an individual profile owner choose which one applies to their own profile — similar to how CB Template Changer's "Profile Template" field lets a user select their own color theme?
Conditional logic inside the Custom Layout box: The Custom Layout field's description mentions it supports "content plugin supported HTML layout." Does this mean a content plugin (such as a conditional/logic plugin) could be used inside that box to conditionally render different layout structures based on a stored field value? If so, is there a recommended plugin or syntax for this, or is that outside what Layout Manager is designed to support?

My goal is to let individual users choose from several different structural profile layouts (not just colors/themes), the same way they already can choose from several color themes via Template Changer. Any guidance on whether this is natively supported within a single Custom Layout field, or whether it would require a different approach entirely, would be appreciated.

Thanks,

I wish I knew, Then we would both know.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 50734
  • Thanks: 8696
  • Karma: 1475
1 month 1 week ago #344397 by krileon

Is it possible to store more than one layout variant within that single field — for example, using conditional logic so that a stored value determines which of several layout variants renders

Yes, you can use substitutions to do that. Specifically IF conditions. Example as follows.
Code:
[cb:if cb_profile_layout="beginner"]Beginner layout here[/cb:if] [cb:if cb_profile_layout="pro"]Pro layout here[/cb:if]

Though it makes little sense to do this. Instead you should use CB Template Changer as each custom template can have its own custom layout. They can then just select the template using the template changer fieldtype.

User-selectable layout switching: If multiple layout variants can be stored and conditionally selected as described above, is there a way to let an individual profile owner choose which one applies to their own profile — similar to how CB Template Changer's "Profile Template" field lets a user select their own color theme?

Yes, as with my example above just have a field to condition against.

Conditional logic inside the Custom Layout box: The Custom Layout field's description mentions it supports "content plugin supported HTML layout." Does this mean a content plugin (such as a conditional/logic plugin) could be used inside that box to conditionally render different layout structures based on a stored field value? If so, is there a recommended plugin or syntax for this, or is that outside what Layout Manager is designed to support?

Substitutions and Joomla Content Plugins are both supported in the layout parameter. You can use the below tutorial for substitution usage information.

www.joomlapolis.com/documentation/127-community-builder/279-tutorials/18353-using-substitutions-throughout-cb

My goal is to let individual users choose from several different structural profile layouts (not just colors/themes), the same way they already can choose from several color themes via Template Changer.

I don't quite understand why you're avoiding CB Template Changer then as it provides exactly that.


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: mjl1817

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

Moderators: beat, nant, krileon
Powered by Kunena Forum