BBCode not parsing - About Me in a variable

Robust

Well-known member
My template has the following:

Code:
<li id="bio" class="profileContent">
<div class="section">
<h3 class="textHeading">Bio</h3>
<div class="primaryContent">
{$user.about}
</div>
</div>
</li>

That works, but BB Code isn't parsed. I think {$user.about} is just getting the content from the database or a cache. How do I parse the BB Code when displaying this?

Edit: Used inspect element to try and figure it out myself. I noticed that the About block in the Information tab has a <div class="baseHtml ugc">, tried adding that but it hasn't worked yet.


First issue solved. Used {xen:raw $user.aboutHtml}
7OPBs4E.png

Few other questions (sorry, slightly new at this so apologies if I'm being annoying)

Trying to have a play around with what I know (or well, what I think I know) and seeing what I can do with it.

Code:
{xen:helper dump, $user}

<xen:if is="{$user.about} == ''">
<li id="about" class="profileContent">
<div class="section">
<h3 class="textHeading">About</h3>
<div class="primaryContent">
{$user.about}
</div>
</div>
</li>
</xen:if>
and
Code:
<xen:if is="{$user.about}"><li><a href="{$requestPaths.requestUri}#about">About</a></li></xen:if>

Ignoring the dump (was just looking at some variables) I'm trying to hide the About tab if the user doesn't have any about content. That works perfectly, but is that extra xen:if necessary? Any issues that could be caused with that (slower page load time etc)? Or am I just being a bit drastic?

And finally, how can I hide the about on the Information tab, since it'll just be repeated twice if I'm showing it here as well.

Never knew it feels so great to work independently. Template modifications :)

FcCuPbs.png
 
Last edited:

Similar threads

Back
Top Bottom