You are here

function simplemnu_get_zindex in SimpleMenu 7

\brief Retrieve the zindex for the CSS files.

This function retrieves a z-index from a Drupal variable and transform it to fit in a CSS file.

\param[in] $name The name of the z-index variable to read. \param[in] $default The default value to use when the variable is not defined.

\return A string representing the current value of the specified z-index.

1 call to simplemnu_get_zindex()
_simplemenu_add_css in ./simplemenu.module
\brief Generate the CSS and add it to the page.

File

./simplemenu.module, line 265
Creates a simplemenu.

Code

function simplemnu_get_zindex($name, $default) {
  $zindex = variable_get($name, $default);
  if ($zindex == -1) {
    $zindex = '';
  }
  else {
    $zindex = 'z-index: ' . $zindex . ';';
  }
  return $zindex;
}