PDA

View Full Version : userinfo in headinclude


squishi
01-04-2009, 09:17 AM
I can't get this to work. :(

I want to show the "about me" text in the headinclude template if the page is the profile of a user.

<if condition="THIS_SCRIPT=='member'">
<if condition="$userinfo[field1]">$userinfo[field1]<else />XXX</if>
</if>
<if condition="THIS_SCRIPT=='member'">
<if condition="$userinfo[field1]!=''">$userinfo[field1]<else />XXX</if>
</if>

Both versions above do not work. I receive "XXX", even if the user has filled out the about me profile field.

Opserty
01-04-2009, 02:08 PM
My guess is that the headinclude template is evaluated before the info is fetched then. You could try:

<if condition="THIS_SCRIPT=='member'">
<if condition="$userinfo['field1'] !='' ">$userinfo[field1]<else />XXX</if>
</if>

But I doubt that is going to make any difference.