Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted February 9, 20169 yr Hello, Does anyone know I would properly go about pulling specific custom profile fields within a block with IP.Pages. i.e. I want to display the 2nd and 3rd profile field but not the 1st and 4th, is there a template tag for this?
February 11, 20169 yr Author 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
March 9, 20169 yr 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.
Archived
This topic is now archived and is closed to further replies.