[SOLVED] Content module show according to CB fields

11 years 8 months ago - 11 years 8 months ago #208657 by deltafidesign
Can I use CB content module to display something eg HTML, a link, etc... According to one or more user fields value?

Example. User A, city Berlin, the module shows HTML code Alpha
For user B, city Paris, the module shows HTML code Beta

So for every user it shows a different code according to city file value for example.

Can I do it?

Please Log in to join the conversation.

11 years 8 months ago #208661 by nant
Yes.

You can use cb substitutions in the html content.

Please Log in to join the conversation.

11 years 8 months ago - 11 years 8 months ago #208663 by deltafidesign
Replied by deltafidesign on topic Re: Content module show according to CB fields
Not sure I explained correctly.

I want a scenario like this:

User A is from Berlin. CB city field = Berlin

If CB city field = Berlin > show HTML code alpha

User B is from Paris. CB city field = Paris

If CB city field = Paris > show HTML code beta

Please Log in to join the conversation.

11 years 8 months ago #208731 by krileon
You can do that with substitutions and a delimiter field. Example as follows.

[cb:if cb_city="Berlin"]Alpha Code[/cb:if]
[cb:if cb_city="Paris"]Beta Code[/cb:if]


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 to join the conversation.

11 years 8 months ago #208744 by deltafidesign
Replied by deltafidesign on topic Re: Content module show according to CB fields
Ok, thats work, but I can show it only in my profile, I would show everywhere like a module. I think that's not possible, right?

Please Log in to join the conversation.

11 years 8 months ago #208750 by nant

deltafidesign wrote: Ok, thats work, but I can show it only in my profile, I would show everywhere like a module. I think that's not possible, right?


Yes it's possible - just use the CB Content module.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.400 seconds

Facebook Twitter LinkedIn