Jump to content

Pull custom profile fields in IP.Pages block


kotaco

Recommended Posts

Update: for my purposes I got it working with this:

I altered it to check to see if the field has content, otherwise returns "This member has not entered their Steam ID." which you can alter as needed. 

{{$fields = $member->profileFields();}}
{{$steamid = $fields['core_pfieldgroups_1']['core_pfield_3']; }}
{{if ( $location != '' )}}
{$steamid}
{{else}}
This member has not entered their Steam ID.
{{endif}}


Change the number id's for core_pfieldgroups_X and core_pfield_X to change which field you are pulling.
Alter $steamid to whatever suits your needs.

Hope that can help somebody save time researching and more time building :) If you see something that can be done better please share 

Link to comment
Share on other sites

  • 4 weeks later...

This one worked for me. Thanks!

{{$fields = \IPS\Member::loggedIn()->profileFields();}}
{{$gmHouseNumber = $fields['core_pfieldgroups_1']['core_pfield_1']; }}
House Number: {$gmHouseNumber}

House number is stores in a first custom profile field in a first group. 

 

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...