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

XF 1.4 Custom Field

Discussion in 'Styling and Customization Questions' started by Dan Hawkins, Sep 13, 2014.

  1. Dan Hawkins

    Dan Hawkins Active Member

    I'm trying to reference a custom field in the nav bar

    Basically - a quick launch button for our clients to be able to launch their application (When the field is populated)

    upload_2014-9-13_22-21-10.png

    Code:
    <!-- eSP Launcher -->
                            <xen:if is="{$user.customFields.esellerproclient}">
                                <a href="{$user.customFields.esellerproclient}" target="_blank" class="navLink"><img src="http://domain.com/styles/drift/images/esp2.png"></img></a>
                            </xen:if>
    So I'm trying to reference an image - if the field is populated...

    However, I've populated the field - yet it fails to populate.

    Settings:

    upload_2014-9-13_22-22-6.png

    upload_2014-9-13_22-22-47.png

    upload_2014-9-13_22-23-50.png

    Basically - I DO NOT want this field displayed in the user info (Banner) or visible on the user's profile.


    It's a private URL, so needs to remain that way - But we want clients to be able to launch the application by clicking the image in the nav bar.

    Any ideas?

    Regards,

    Dan
     
  2. Dan Hawkins

    Dan Hawkins Active Member

    I;ve tried using Div's (referencing them in the EXTRA.css too) and also the same "il class" as the home icon.... no joy... Any ideas?
     
  3. Dan Hawkins

    Dan Hawkins Active Member

  4. Chris D

    Chris D XenForo Developer Staff Member

    Instead of $user, try $visitor

    $visitor is always the currently logged on user.

    I have to be honest I only glanced over what you put so far but certainly that would need correcting first.
     
  5. Dan Hawkins

    Dan Hawkins Active Member

    Thank you sincerely, Chris - this worked and everything is functional - I wasn't aware of $visitor... You're a life saver! Right in time for the company demonstration at tomorrow's customer Roadshow!

    I can't thank you enough!!!!!!!!
     

Share This Page