1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 messagecount and custom field conditionals

Discussion in 'Styling and Customization Questions' started by eagle eyes, Jan 5, 2014.

  1. eagle eyes

    eagle eyes Active Member

    So i have Ranks A that i display based on message count by default for all users (using no custom field conditionals).

    I want to have Ranks B and Ranks C that i want to display for users, based on what they have selected for the custom field Rank A/Rank B/or Rank C.

    How can i do that so all users have Ranks A selected by default and then those who "prefer" Ranks B they can simply change the custom field to display Ranks B for themselves.
    Last edited: Jan 5, 2014
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Depending on exactly what it is you are trying to do, you can edit the template(s) and use this:
    <xen:if is="{$user.customFields.field_id}">...</xen:if>
  3. eagle eyes

    eagle eyes Active Member

    I am trying to use this if a field is not selected (blank) (to show for users who have not selected the field by default) and if it is selected show different image.


    Ranks A (by default, even if not selected any user field OR by selecting Ranks A)
    Ranks B (by selecting Ranks B)
    Ranks C (by selecting Ranks C)
  4. Brogan

    Brogan XenForo Moderator Staff Member

    <xen:if is="{$user.customFields.field_id}">
    Your code for rank B or rank C here {$user.customFields.profile_field_id}
    <xen:else />
    Your code for rank A

Share This Page