Jump to content

Calling custom profile fields


iozay

Recommended Posts

Posted

Hi there!

Does anyone know how I can call the content of a specific profile field in someones profile and in pages? Thanks in advance! ^_^ 

Posted
On 12/30/2016 at 4:12 PM, iozay said:

Hi there!

Does anyone know how I can call the content of a specific profile field in someones profile and in pages? Thanks in advance! ^_^ 

You can't. There are no keys or identifiers (please fix that IPS!). You have to loop through them all and check the name, OR have a setting in the ACP where you select the field and then call it that way. The setting is more reliable because the field can be renamed at any time. 

 

Posted
On 12/31/2016 at 0:12 AM, iozay said:

Hi there!

Does anyone know how I can call the content of a specific profile field in someones profile and in pages? Thanks in advance! ^_^ 

You could use Pages blocks to do that 

example

Create the members block feed

delete the content and use

{{if count( $members ) }}
{{foreach $members as $member}}
{{$fields = $member->profileFields();}}

	{{$your_custom_profile_field = $fields['core_pfieldgroups_1']['core_pfield_1']; }}
		{{if ( $your_custom_profile_field != '' )}}
			{$your_custom_profile_field|raw}
		{{endif}}

{{endforeach}}
{{endif}}

then you can use the feed configuration settings to select a specif group, you cant select a specif user only if you add a specif user group for the user you want

Archived

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

  • Recently Browsing   0 members

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