Created
November 8, 2012 17:04
-
-
Save waako/4040102 to your computer and use it in GitHub Desktop.
Output all field values into a single unordered list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prepare a renderable array to hold items. | |
$variables['planning'] = array( | |
'#theme' => 'item_list', | |
'#items' => array(), | |
); | |
// Add the term as a new renderable item in the list. | |
foreach(($variables['field_planning'] + $variables['field_diet'] + $variables['field_healthy']) as $taxon_term_field) { | |
$term_name = $taxon_term_field['taxonomy_term']->name; | |
$variables['planning']['#items'][] = $term_name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment