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

How Do I Add Elements Profile Sidebar?

Discussion in 'XenForo Questions and Support' started by Kenneth Holland, Aug 31, 2012.

  1. Kenneth Holland

    Kenneth Holland Active Member


    I've figured out how to add elements on a users profile sidebar that appears on message threads but how do I add elements to the user profile sidebar on the profile page itself?

    I have a screenshot below...I added a custom field (country flag) that appears on the threads but not in the profile:


    How do I add it here?

    Thanks. :)

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> member_view

    Add the red code and specify the field_id:

    		<div class="section infoBlock">
    			<dl class="secondaryContent pairs">
    				<xen:hook name="member_view_info_block">
    				<xen:if is="{$canViewOnlineStatus}">
    					<dt>{xen:phrase last_activity}:</dt>
    						<dd><xen:datetime time="$user.effective_last_activity" /></dd>
    				<dt>{xen:phrase joined}:</dt>
    					<dd>{xen:date $user.register_date}</dd>
    				<dt>{xen:phrase messages}:</dt>
    					<dd>{xen:number $user.message_count}</dd>
    				<dt>{xen:phrase likes_received}:</dt>
    					<dd>{xen:number $user.like_count}</dd>
    				<dt>{xen:phrase trophy_points}:</dt>
    					<dd><a href="{xen:link 'members/trophies', $user}" class="OverlayTrigger">{xen:number $user.trophy_points}</a></dd>
    				<xen:if is="{$canViewWarnings}">
    					<dt>{xen:phrase warning_points}:</dt><dd>{xen:number $user.warning_points}</dd>
    				<xen:if is="{$user.customFields.field_id}">
    					<dt>{xen:helper userFieldTitle, 'field_id'}:</dt><dd>{xen:helper userFieldValue, {$userFieldsInfo.field_id}, $user, {$user.customFields.field_id}}</dd>
    The result:

    Screen shot 2012-09-01 at 7.09.38 AM.png
    DeltaHF likes this.

Share This Page