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

XF 1.2 Custom Username

Discussion in 'Troubleshooting and Problems' started by The Forum Heroes, Sep 30, 2013.

  1. The Forum Heroes

    The Forum Heroes Well-Known Member

    I'm trying to do the following, but it is just showing the code on the site.

    Code:
        <h3 class="userText">
    
    
       <xen:if is="{$post.user_id} == 1">
        {
          Hi I am a custom name
          } else {
      <xen:username user="$user" itemprop="name" rich="true" />
          }
    </xen:if>
                <xen:if hascontent="true">
     
    Last edited: Sep 30, 2013
  2. Liam W

    Liam W Well-Known Member

    HTML:
    <h3 class="userText">
        <xen:if is="{$post.user_id} == 1">
            custom username
        <xen:else />
            <xen:username user="$user" itemprop="name" rich="true" />
        </xen:if>
        <xen:if hascontent="true">
        ...
    </h3>
    
     
    Veer and The Forum Heroes like this.

Share This Page