Skip to content

Instantly share code, notes, and snippets.

@jdvc
Created August 26, 2015 22:17
Show Gist options
  • Select an option

  • Save jdvc/d23aa66be84a3392935e to your computer and use it in GitHub Desktop.

Select an option

Save jdvc/d23aa66be84a3392935e to your computer and use it in GitHub Desktop.
<?php
if ($node->type == 'course' || $node->type == 'brand') {
$extrafield_name = 'vhp3_action_menu';
if (isset($extra_fields[$extrafield_name]) && isset($extra_fields[$extrafield_name]['visible']) && $extra_fields[$extrafield_name]['visible']) {
$node->content[$extrafield_name] = array(
'#title' => t('VHP 3 Action Menu'),
'#theme' => 'ccs_brands_vhp_action_menu',
'#view_mode' => $view_mode,
'#language' => $langcode,
'#field_name' => $extrafield_name,
'#entity_type' => 'node',
'#bundle' => $node->type,
'#object' => $node,
'#items' => $node->vhp['data']['action_menu_styling']['am_container'],
'#label_display' => 'hidden',
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment