You are here

function template_preprocess_om_maximenu_modal in OM Maximenu 6

Same name and namespace in other branches
  1. 8 inc/om_maximenu.render.inc \template_preprocess_om_maximenu_modal()
  2. 7 inc/om_maximenu.render.inc \template_preprocess_om_maximenu_modal()

Process variables for om_maximenu_modal.tpl.php

File

inc/om_maximenu.render.inc, line 574
OM Maximenu Render

Code

function template_preprocess_om_maximenu_modal(&$vars) {

  // sort by weight
  uasort($vars['links']['links'], 'om_sort_by_weight');
  $links = $vars['links'];

  // menu name
  $vars['maximenu_name'] = om_string_name($links['title']);

  // disable link when active
  $vars['disabled'] = isset($links['disabled']) && $links['disabled'] == 1 ? 1 : 0;
  $vars['code'] = $links['code'];
  $vars['count'] = 0;
  $vars['total'] = count($links['links']);
  $vars['template_files'][] = 'om-maximenu-modal__' . $vars['menu_key'];
  $vars['template_files'][] = 'om-maximenu-modal__' . $vars['maximenu_name'];
  $vars['template_files'][] = 'om-maximenu-modal__' . $links['output'];

  //dsm($vars);
}