Changeset 618

Show
Ignore:
Timestamp:
10/20/07 23:55:03 (1 year ago)
Author:
laurentj
Message:

added new method appendZone to jTpl

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix/tpl/jTpl.class.php

    r611 r618  
    9898    } 
    9999 
    100  
    101100#ifnot JTPL_STANDALONE 
    102101    /** 
     
    110109        $this->_vars[$name] = jZone::get ($zoneName, $params); 
    111110    } 
     111 
     112    /** 
     113     * append a zone content to a template variable 
     114     * @param string $name the variable name 
     115     * @param string $zoneName  a zone selector 
     116     * @param array  $params  parameters for the zone 
     117     * @see jZone 
     118     */ 
     119    function appendZone($name, $zoneName, $params=array()){ 
     120        if(isset($this->_vars[$name])) 
     121            $this->_vars[$name] .= jZone::get ($zoneName, $params); 
     122        else 
     123            $this->_vars[$name] = jZone::get ($zoneName, $params); 
     124    } 
     125 
    112126    /** 
    113127     * assign a zone content to a template variable only if this variable doesn't exist 
  • trunk/lib/jelix/tpl/jTpl.class.php

    r611 r618  
    9898    } 
    9999 
    100  
    101100#ifnot JTPL_STANDALONE 
    102101    /** 
     
    110109        $this->_vars[$name] = jZone::get ($zoneName, $params); 
    111110    } 
     111 
     112    /** 
     113     * append a zone content to a template variable 
     114     * @param string $name the variable name 
     115     * @param string $zoneName  a zone selector 
     116     * @param array  $params  parameters for the zone 
     117     * @see jZone 
     118     */ 
     119    function appendZone($name, $zoneName, $params=array()){ 
     120        if(isset($this->_vars[$name])) 
     121            $this->_vars[$name] .= jZone::get ($zoneName, $params); 
     122        else 
     123            $this->_vars[$name] = jZone::get ($zoneName, $params); 
     124    } 
     125 
    112126    /** 
    113127     * assign a zone content to a template variable only if this variable doesn't exist 
Download in other formats: Unified Diff Zip Archive