[SOLVED] Substitutions in "formatname" Field

5 months 1 week ago - 5 months 1 week ago #314241 by XBOOMX
I made adjustments in the formatname field to generate name, gender, age. Works too.

Layout value of the user list:

[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"
5 months 1 week ago #314247 by krileon
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 - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
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 EST to 4:00 PM EST. 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
5 months 1 week ago #314254 by XBOOMX
Thanks for the quick help. Problem solved.
Have a good time.
The following user(s) said Thank You: krileon
Moderators: beatnantkrileon
Time to create page: 0.683 seconds

Facebook Twitter LinkedIn