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 Da Bookie Mon, Sep 30, 2013.

  1. Da Bookie Mon

    Da Bookie Mon Formerly The Forum Heroes

    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 Da Bookie Mon like this.

Share This Page