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

Feel like an idiot...line break?

Discussion in 'Styling and Customization Questions' started by Ladegro, Aug 13, 2012.

  1. Ladegro

    Ladegro Member

    Hi, I've added an extra tab on the member-profile, in which I want to keep some information only accessible to members of a certain group.

    Now I'm creating the page for this tab, I just want to show some custom user fields. I have some multi-line textfields for eg. the address, but no matter what I try, I can't seem to get any line breaks to show... I've copied the code from other pages like member_view but that doesn't do the job;
    xenforo_linebreak.jpg

    How can I adjust my code or css styling to have correct line breaks in the custom user fields? Now it just puts everything on one line...

    Code:
    <li id="qmiTab" class="profileContent">
    <br />
    <h3 class="textHeading">Informatie alleen zichtbaar voor QMIers:</h3>
     
    <div class="section infoBlock">
      <div class="secondaryContent pairs">
        <xen:if hascontent="true">
          <div class="pairsColumns aboutPairs">
          
               <xen:contentcheck>
     
         <xen:if is="{$user.customFields.homeaddress}">
             <dl>
                      <dt>{xen:helper userFieldTitle, homeaddress}:</dt> 
     <dd class="baseHtml">
    <xen:if is="is_array({$user.customFields.homeaddress})">
    <ul>
    <xen:foreach loop="{$user.customFields.homeaddress}" value="$_fieldValueHtml">
    <li>{xen:raw $_fieldValueHtml}</li>
    </xen:foreach>
    </ul>
    <xen:else />
    {xen:raw $user.customFields.homeaddress}
    </xen:if>
     </dd>
                    </dl>
                  </xen:if>
     
               </xen:contentcheck>
          </div>
        </xen:if>
      </div>
    </div>
    </li>
    
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Use this template function:

    Code:
    {xen:string nl2br, {xen:raw $_fieldValueHtml}}
    
     
    sonnb, Shelley and Chris D like this.
  3. Ladegro

    Ladegro Member

    Gracias...
     

Share This Page