Changeset 14331

Show
Ignore:
Timestamp:
01/09/08 10:51:48 (1 year ago)
Author:
adrenalin
Message:

Added configurable option for inserting the class name to the link tag as well.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/fi.protie.navigation/documentation/CHANGES

    r13624 r14331  
    66  which might even break existing functionality. 
    77- All items marked with "+" represent completely new features. 
     8 
     92008-01-09 adrenalin 
     10  - Added configurable option for inserting the class name to the link tag as well. 
    811 
    9122007-11-23 adrenalin 
  • trunk/midcom/fi.protie.navigation/main.php

    r14140 r14331  
    126126     */ 
    127127    var $show_only_current = false; 
     128     
     129    /** 
     130     * Should the CSS class be in the link as well 
     131     *  
     132     * @access public 
     133     * @var boolean 
     134     */ 
     135    var $class_to_link = false; 
    128136 
    129137    /** 
     
    693701 
    694702        $get_params = $this->_get_parameter_string(); 
     703         
     704        if ($this->class_to_link) 
     705        { 
     706            $link_class = $class; 
     707        } 
     708        else 
     709        { 
     710            $link_class = ''; 
     711        } 
    695712 
    696713        echo "{$indent}    <li{$class}>\n"; 
    697         echo "{$indent}        <a href=\"{$item[MIDCOM_NAV_FULLURL]}{$get_params}\">{$item[MIDCOM_NAV_NAME]}</a>\n"; 
     714        echo "{$indent}        <a href=\"{$item[MIDCOM_NAV_FULLURL]}{$get_params}\"{$link_class}>{$item[MIDCOM_NAV_NAME]}</a>\n"; 
    698715 
    699716        // If either of the follow nodes switches is on, follow all the nodes