to print out one level menu navigation
*
* @param Array Array of pages
*
* @return String HTML UL formatted string
*
*/
if( ! function_exists('get_navigation'))
{
function get_navigation($items)
{
$nav = '';
foreach($items as $key => $page)
{
$active = ( ! empty($page['active_class'])) ? ' class="'.$page['active_class'].'" ' : '';
$title = ($page['nav_title'] != '') ? $page['nav_title'] : $page['title'];
// Adds the suffix if defined in /application/config.php
// if ( config_item('url_suffix') != '' ) $url .= config_item('url_suffix');
$nav .= '
'.$title. '';
}
return $nav;
}
}
/**
* Returns a HTML UL formatted nested tree menu from a pages nested array
* Used by to print out a nested navigation
*
* @param Array Array of pages
* @param Array Array of container UL (first one) attributes. Can contains 'id' and 'class'
*
* @return String HTML UL formatted string
*
*/
if( ! function_exists('get_tree_navigation'))
{
function get_tree_navigation($items, $id = NULL, $class = NULL, $first_class = NULL, $last_class = NULL)
{
// HTML Attributes
$id = ( ! is_null($id) ) ? ' id="' . $id . '" ' : '';
$class = ( ! is_null($class) ) ? ' class="' . $class . '" ' : '';
log_message('error', $class);
$tree = '';
return $tree;
}
}
if( ! function_exists('get_language_navigation'))
{
/**
* Returns a HTML UL formatted nested tree menu from a pages nested array
* Used by to print out the languages menu
*
* @deprecated
*
* @param Array Array of pages
* @param Array Array of container UL (first one) attributes. Can contains 'id' and 'class'
*
* @return String HTML UL formatted string
*
*/
function get_language_navigation($items)
{
$nav = '';
foreach($items as $lang)
{
$active = ( ! empty($lang['active_class'])) ? ' class="'.$lang['active_class'].'" ' : '';
$nav .= '' . $lang['name']. '';
}
return $nav;
}
}
if( ! function_exists('get_next_prev_page'))
{
/**
* Returns the previous / next page enclosed in the given tag
*
* @deprecated Use the and tags
*
* @param $page
* @param $prefix
*
* @return string
*/
function get_next_prev_page($page, $prefix)
{
$prefix = (lang($prefix) != '#'.$prefix ) ? lang($prefix) : $prefix;
$title = ($page['nav_title'] != '') ? $page['nav_title'] : $page['title'];
$link = $prefix. '' . $title . '';
return $link;
}
}
if( ! function_exists('get_next_prev_article'))
{
/**
* Returns the previous / next article enclosed in the given tag
*
* @deprecated Use the and tags
*
*/
function get_next_prev_article($article, $prefix)
{
$prefix = (lang($prefix) != '#'.$prefix ) ? lang($prefix) : $prefix;
$link = $prefix. '' . $article['title']. '';
return $link;
}
}
/* End of file navigation_helper.php */
/* Location: .application/helpers/navigation_helper.php */