Jump to content

change format of custom field?


Ocean West

Recommended Posts

Posted

You can modify template core->front->profile->profile with:

{{$fields['core_pfield_2'] = str_replace ('<br>',',',$fields['core_pfield_2']);}}

Inserted in before the profile fields loop (search cProfileFields).

2 is the id of the profile field (if you edit profile field you will see id at end of url in browser).

The resulting area should look like:

                            <div class='ipsWidget_inner ipsPad'>
 				<ul class='ipsDataList ipsDataList_reducedSpacing cProfileFields'>
	
                                   {{$fields['core_pfield_2'] = str_replace ('<br>',',',$fields['core_pfield_2']);}}
                  
                                   {{foreach $fields as $field => $value}}
  					<li class='ipsDataItem ipsType_break'>
						<span class='ipsDataItem_generic ipsDataItem_size3 ipsType_break'><strong>{lang="$field"}</strong></span>
						<span class='ipsDataItem_generic'><div class='ipsType_break ipsContained'>{$value|raw}</div></span>
					</li>
				  {{endforeach}}
				</ul>
			</div>

 

Posted

it worked but then on the public profile it repeated a field a few times, haven't had a chance to look at it further. 

i wonder is there any sort of tags that can be added directly here, that would force the content to be comma separated?

594c5c707b32e_ScreenShot2017-06-22at5_08_19PM.thumb.png.50ec569f0354a27bf1c7923aaf6fdc85.png

 

Posted

What do you mean by "public profile"? 

You can use the same type of template code as I gave you for the profile template in the display format block you showed.  That display format area is only for the info under the users image in posts.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...