Equine Staff Directory

PHP_START
function getPeopleBySpecialty() {
= new EntityFieldQuery();
(‘entity_type’, ‘node’)
->entityCondition(‘bundle’, ‘person’)
->propertyCondition(‘status’, NODE_PUBLISHED)
->fieldCondition(‘field_specialties’, ‘tid’, )
->fieldOrderBy(‘field_c_last_name’, ‘value’, ‘ASC’);
= ();
= array();
if(\[‘node’\]’ != null) {
= array_keys(\[‘node’\]’);
= entity_load(‘node’, );
}
return ;
}

= array(‘Equine Medicine’ => getPeopleBySpecialty(73), ‘Equine Surgery’ => getPeopleBySpecialty(74), ‘Equine Field Services’ => getPeopleBySpecialty(79));

foreach( as => ){
echo “

“;
echo “

“;
echo “

“;
echo “

“;
= getPeopleBySpecialty(73);
//print_r();
foreach( as ){
// = node_load();
= entity_metadata_wrapper(‘node’, );
= ->value();
= ->value();
= ->value();
= explode(“@”, )[0];
= ->value()\[‘uri’\]’;
= ”;
if(!empty()) {
= explode(‘public://pictures/’, );
= ;
= “https://vetmed.iastate.edu/sites/default/files/pictures/”;
= ““;
}
= ->value();
= ->value();
= ->value();
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
}

echo “

“;
echo “

Name Phone E-mail Room
“;
echo ;
echo “
,

“;
}
PHP_END

From https://vetmed.iastate.edu/vmc/equine/staff-directory