Jump to content

Display profile field using template logic


F. John

Recommended Posts

Posted

Hello,

I'm trying to display 200 characters of each member's About Me profile info on a HTML template that loops through all the members, however I cant seem to be able to display the info I want. Here's where I am:

{truncate="{$user->member()->['pfield_17']}" length="200"}

I'm obviously doing it wrong, I'm sure it is what you'd call a simple mistake, but guidance would be much appreciated.

Also, Using your correction, how could I show the a custom profile field with the ID number 23?

  • 2 months later...
Posted

Found it! This one worked for me:

{{$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.

  • Recently Browsing   0 members

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