Skip to Content Skip to Menu

[SOLVED] Substitutions in "formatname" Field

  • XBOOMX
  • XBOOMX
  • OFFLINE
  • Posts: 131
  • Thanks: 12
  • Karma: 0
5 years 2 months ago - 5 years 2 months ago #314241 by XBOOMX
Hello,
I made adjustments in the formatname field to generate name, gender, age. Works too.

Layout value of the user list:

[Value]
[cb: if cb_gender = "m"] <img src = "images / gender / male-16x16.png" alt = "man symbol" /> [/ cb: if]

[cb: if cb_gender = "f"] <img src = "images / sex / female-16x16.png" alt = "female-16x16.png" /> [/ cb: if]

[cb: userfield field = "cb_age" /]

Unfortunately there is a problem displaying in activities


After saving it will be displayed.



When the page is reloaded (f5) everything is normal

How to write it correctly without alt = "man symbol"
Attachments:
Last edit: 5 years 2 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
5 years 2 months ago #314247 by krileon
Replied by krileon on topic Substitutions in "formatname" Field
You're using a relative path from current location. If you want it to be relative from web root you need to prepend a forward slash (e.g. /images/gender/male-16x16.png instead of images/gender/male-16x16.png). It's better to use a live path and add your domain to it. You can actually do that with substitutions using [cb:config param="live_site" /] (e.g. [cb:config param="live_site" /]/images/gender/male-16x16.png).


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

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

  • XBOOMX
  • XBOOMX
  • OFFLINE
  • Posts: 131
  • Thanks: 12
  • Karma: 0
5 years 2 months ago #314254 by XBOOMX
Replied by XBOOMX on topic Substitutions in "formatname" Field
Thanks for the quick help. Problem solved.
Have a good time.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum