Ejemplo n.º 1
0
/**
 * Creates a navigation div with the subnav items of the current section.
 *
 * Optionally get the subnav links for any section given as a parameter.
 *
 * Parameters:
 *   $section - defaults to the current section but can be overridden
 *   $pre_string - a string to go before the navigation
 *   $post_string - a string to go after the naviagion
 *   $id - the id of the navigation <div>
 *
 * @return Formatted navigation <ul> wrapped in a <div>
 */
function sub_navigation($section = '', $pre_string = '', $post_string = '', $id = 'subnav')
{
    global $_section;
    # Use the current section unless a specific section is given as a parameter
    $section = use_default($section, $_section);
    $sitemap = get_sitemap();
    if (has_sub_items($section)) {
        $sub_nav = '';
        if (exists($pre_string)) {
            $sub_nav .= "{$pre_string}";
        }
        $sub_nav_items = format_navigation($sitemap[$section], $exclusions = array(), $include_sub_nav = true, $include_ids = false);
        $sub_nav .= content_tag('div', $sub_nav_items, array('id' => $id));
        if (exists($post_string)) {
            $sub_nav .= "{$post_string}";
        }
        return $sub_nav;
    }
}
Ejemplo n.º 2
0
 case 'theme':
 case 'labelsnotes':
     $old = format_color($old);
     $new = format_color($new);
     break;
 case 'referencematerial':
     $old = format_referencematerial($old, $reference_material);
     $new = format_referencematerial($new, $reference_material);
     break;
 case 'display':
     $old = format_display($old, $string);
     $new = format_display($new, $string);
     break;
 case 'navigation':
     $old = format_navigation($old, $string);
     $new = format_navigation($new, $string);
     break;
 case 'review':
     $old = format_review($old, $string);
     $new = format_review($new, $string);
     break;
 case 'passmark':
 case 'distinction':
     $old = format_passmark($old, $string);
     $new = format_passmark($new, $string);
     break;
 case 'labs':
     $old = format_lab($old, $changed_labs);
     $new = format_lab($new, $changed_labs);
     break;
 case 'marking':