Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

[SOLVED] Help with conditionals syntax for #displayed

  • Pomond
  • Pomond
  • OFFLINE
  • Posts: 64
  • Thanks: 17
  • Karma: 5
7 years 9 months ago #292652 by Pomond
Thank you! Adding the extra space between the quotes did the trick, and I'm now seeing the username swap out the firstname (and lastname) in the manner I wanted.

Here's the code I ended up with:
Code:
[cb:if cb_firstnameconditional!=" " or cb_lastname_conditional!=" "] [cb:if cb_firstnameconditional!=" "][cb:userfield field="firstname" /][/cb:if] [cb:if cb_lastname_conditional!=" "][cb:userfield field="lastname" /][/cb:if] [cb:else][username][/cb:else] [/cb:if]

Now, if a user sets their firstname or lastname to be private, the username will display instead. Thanks again!
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