@ Tim
First, tip, when you paste code, highlight it and click the code button {}. That will make sure it does not get mangled.
Try this CSS instead:
cn-list span.fn, #cn-list span.org {
display: inline-block !important;
width: 25% !important;
}
#cn-list span.phone-number-block {
display: inline-block !important;
margin: 0 !important;
width: 45% !important;
}
You can limit the phone numbers in more than one way, depends on what you need…
You can limit by type:
$entry->getPhoneNumberBlock( array( 'type' => 'work,cell' ) )
$entry->getPhoneNumberBlock( array( 'type' => 'work' ) )
This would not limit the number per type though… say you had two work numbers and two cell numbers for an entry, the result would be four numbers.
OR
You can limit by a hard limit:
$entry->getPhoneNumberBlock( array( 'limit' => 1 ) )
This would “hard” limit to only one number but there would be little control. It would simply be the first number pulled from the db for the entry.
You could limit one number of a particular type like this:
$entry->getPhoneNumberBlock( array( 'type' => 'work', 'limit' => 1 ) )
Downside here is if you had two work numbers for entry, the result could be either one.
OR
You can show only the “Preferred” number:
$entry->getPhoneNumberBlock( array( 'preferred' => true ) )
The downside here, is if you did not set a “Preferred” phone number when adding the entries, you’ll have to go back, edit each one, setting the preferred number.
As for the contact block, right, I should have one and I just did. This change will be part of the 8.2.5 release. But since you are editing the template, it is simple enough to add your own block, like so:
'<span class="my-contact-block">' . $entry->getContactNameBlock() . '</span>'
Hope that helps!
