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

XF 1.2 Get a Custom User Field in PAGE_CONTAINER

Discussion in 'XenForo Questions and Support' started by Felomeno, Mar 3, 2014.

  1. Felomeno

    Felomeno Member

    Hey everyone, I just wanted to change something in the PAGE_CONTAINER template depending on the value of a custom user field. I'm checking the value in the same way I've done it before:

    <xen:if is="{$user.customFields.pageWidth}">
    <div>it works</div>

    But it's not working, it seems that it never gets the value of any custom field.
    I was wondering if that's supposed to happen or I'm doing something wrong.

    Last edited: Mar 3, 2014
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You want the current logged in user?

    <xen:if is="{$visitor.customFields.pageWidth}">
    <div>it works</div>
    Felomeno likes this.

Share This Page