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;

    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...

    <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:if is="{$user.customFields.homeaddress}">
                      <dt>{xen:helper userFieldTitle, homeaddress}:</dt> 
     <dd class="baseHtml">
    <xen:if is="is_array({$user.customFields.homeaddress})">
    <xen:foreach loop="{$user.customFields.homeaddress}" value="$_fieldValueHtml">
    <li>{xen:raw $_fieldValueHtml}</li>
    <xen:else />
    {xen:raw $user.customFields.homeaddress}
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Use this template function:

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

    Ladegro Member


Share This Page