Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Substitution usage

  • KatoKalin
  • KatoKalin
  • OFFLINE
  • Posts: 265
  • Thanks: 11
  • Karma: -5
  • Add-ons
10 years 11 months ago #237784 by KatoKalin
Substitution usage was created by KatoKalin
In a user list I am using substitution to show specific field contents dynamically.
Now when I use something like
Code:
<div name="test" id="test" >[cb:userdata field="cb_test" output="csv" /]</div>

Idea is, I want to style the output not only to display the value of cb_test field but also the title/name of the field. How am I supposed to do that?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48474
  • Thanks: 8281
  • Karma: 1443
10 years 11 months ago #237829 by krileon
Replied by krileon on topic Substitution usage
Title only outputs for certain formatting. Formatting is default "none". To output as DIV formatted for example you'd use the below.

[cb:userdata field="cb_test" output="csv" formatting="div" /]

See substitution tutorial below for further formatting usage.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb


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 or Create an account to join the conversation.

  • KatoKalin
  • KatoKalin
  • OFFLINE
  • Posts: 265
  • Thanks: 11
  • Karma: -5
  • Add-ons
10 years 11 months ago #237842 by KatoKalin
Replied by KatoKalin on topic Substitution usage

krileon wrote: Title only outputs for certain formatting. Formatting is default "none". To output as DIV formatted for example you'd use the below.

[cb:userdata field="cb_test" output="csv" formatting="div" /]

See substitution tutorial below for further formatting usage.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb


Unfortunately it is not working yet. I am using a delimiter field to show up in the user list. I have put in following code: [cb:userdata field="username" output="csv" formatting="div" /]

Still only the calue shows up. Btw, I had read the documentation from your link before my posting however I could not find information that both, output and formatting are required.

But still this does not seem to be the solution in my case.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48474
  • Thanks: 8281
  • Karma: 1443
10 years 11 months ago #237851 by krileon
Replied by krileon on topic Substitution usage
You're using userdata, which is always raw. You need to use userfield. You also probably need to output as HTML. Please see the below example.

[cb:userfield field="username" formatting="div" /]

Note the field still needs to be accessible and visible for this to work as substitutions use API, which respects access and configuration.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum