UserBlurb Partially Appearing in Separate Template

CaptainMorgan

Active member
In the member_list_item template, there is the following line:
Code:
<div class="userBlurb dimmed">{xen:helper userBlurb, $user}</div>

This allows for something like the following:
Website Manager, Male, from North Texas

I'm trying to duplicate this feature on a page, within an addon, yet the code is identical:
Code:
<div class="userBlurb dimmed">{xen:helper userBlurb, $user}</div>

The problem is that instead of saying ", from <location>", it is missing entirely. So you have the following:
Website Manager, Male

Any ideas where I'm going wrong?
Thanks!
 
It's possible the $user record doesn't contain the data.

You can dump $user on each page/template to see the difference.
Code:
{xen:helper dump, $user}
 
Thank you Brogan.

Not only does it not contain the data, but it does not include nearly as many fields as when I dump the data for the XF Member's page.

So this is a coding issue... do you know which source file I need to investigate so I can see why there are fields that are getting skipped, when it's not the Member's page? IE: it appears I'm running into this sort of problem:

If it is the Member's page, include all fields. Otherwise, include a portion of them.

Cheers
 
The data has to be fetched using a query.

Only the add-on developer can really change that.
 
Ah, if anyone has a similar problem with the above, the problem is that my page is missing a query for the xf_user_profile table. The Member's page seems to make more than one query: xf_user obviously, and xf_user_profile table among them.
 
Top Bottom