Comment to 'How to add a custome item to person's profile (in profile page and card)'
  • Well, it heavily depends on how that custom "members_country" filed is implemented on your site. Whether it is stored as a plain text, or a list item, and if it is a list item - what list is in use - a custom one or the default "Country" one. All of this is unclear.

    If we assume that the exact field name is 'members_country' and it stores just an item ID from a "Country" list then the following handler should display a country in that case:

    if (!isset($aContentData['members_country'])) return ' ';
    $sVal = $aContentData['members_country'];
    $aCountries = BxBaseFormView::getDataItems('Country');
    if (!isset($aCountries[$sVal])) return ' ';
    return $oMenuObject->getUnitMetaItemText($aCountries[$sVal]);