Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 31)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Show info on prfile based on CB field value

  • Erik66
  • Erik66
  • OFFLINE
  • Posts: 1
  • Thanks: 0
  • Karma: 0
13 years 4 months ago #174452 by Erik66
Hello,

I'm building a userlist with CB 1.7 / Joomla! 1.7. The website has registered users and part of them are classified as 'members'. The CB fields list has a field cb_member (chekcbox) which gets ticked if a person is a 'member'. On the profile pages, I want to show personal info but only want to show some of it to logged-in registered users who are classified as 'members'. So, in other words, I want to show specific info from members to members only. Certain profile info is free for all logged in and registered users, certain profile info is members to members only.

I'm trying to use the [cb:if] function in a text delimiter field to do this as it knows the #me substitution. But as the cb_members field is not a system field, it seems not possible to construct a filter using the #me substitution.

So, how would you construct a display statement that shows (for instance) an email address to a member? I started out with

[cb:if user="#me" cb_member="1"] [cb:userdata field="cb_emailaddress" /] [/cb:if]

but that appears not to work. From the examples I saw here ( www.allmysocials.com/directory/tutorials/item/233-substitution-usage?pop=1&tmpl=component&print=1 ) i and here ( www.joomlapolis.com/forum/77-cb-12-stable-general-discussion-area/93352-cb-content-and-cb-menu#93384 ) gathered the 'user="#me" and the second operator are executed as a logical AND but none of the examples show how a non-system field can be used in the syntax.

Does anyone have a suggestion how to do this ?

Thanks a lot,

Erik

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

Moderators: beatnantkrileon
Powered by Kunena Forum