Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

Code field Profile Value Layout

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
6 months 2 weeks ago - 6 months 2 weeks ago #338084 by galanopd
Code field Profile Value Layout was created by galanopd
I've encountered an issue with customizing the appearance of a code field result within the Profile Value Layout.
While the query itself functions correctly and returns the desired result, applying custom formatting such as "[value] some text" doesn't seem to have any effect.
I attempted to use both [cb:userdata field="field_name" /] and [cb:userfield field="field_name" /] tags to call the field in another CustomHTML field, but unfortunately, neither of these solutions resolved the issue.
Last edit: 6 months 2 weeks ago by galanopd.

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

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
6 months 2 weeks ago - 6 months 2 weeks ago #338085 by galanopd
Replied by galanopd on topic Code field Profile Value Layout
Issue solved by using [cb:userfield field="field_name" /] in the CustomHTML and changing "Show on Profile" from "No" to "Yes".
 
Last edit: 6 months 2 weeks ago by galanopd.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 months 2 weeks ago #338091 by krileon
Replied by krileon on topic Code field Profile Value Layout
Layouts should work fine for code fields. The resulting code is passed through the field layout function. Layouts however only output for HTML formatted substitutions. So exclusively [cb:userfield field="FIELD_NAME" /]. As noted in our substitution documentation below [cb:userdata field="FIELD_NAME" /] and [FIELD_NAME] are raw output so they will not include the layout.

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

You shouldn't need a second field to append to your code field. Just be sure it's set to display on profile and use [cb:userfield field="FIELD_NAME" /] and your substitution should display with layout fine.


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

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

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
6 months 2 weeks ago #338101 by galanopd
Replied by galanopd on topic Code field Profile Value Layout

You shouldn't need a second field to append to your code field. Just be sure it's set to display on profile and use [cb:userfield field="FIELD_NAME" /] and your substitution should display with layout fine.

I need to display it in a particular location, within a Bootstrap card. Certain fields appear better using the [cb:userfield...], while others [cb:userdata field...] with parameters like "formatting div", or simply [cb_field]. Things become challenging when there's a need to set "Prepare content using CMS Content plugins" to Yes within the htmlCode field and there are combinations of userfield, userdata, and raw there. Then I have issues with the functionality of the htmlCode, like some fields work and others don't or the htmlCode field doesn't work at all. Then I have to improvise...

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

Moderators: beatnantkrileon
Powered by Kunena Forum