Changeset 304


Ignore:
Timestamp:
Jan 25, 2008 3:53:11 AM (16 years ago)
Author:
quinn
Message:

Added a key to the getPath method to select what is used to build the path.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Navigation.inc.php

    r186 r304  
    182182     *
    183183     * @access  public
    184      *
    185      * @return  mixed   Path (string) or false if path param is not set.
    186      */
    187     function getPath()
     184     * @param   string   $key   Which value to use in the path (usually head_title or body_title or just title).
     185     * @return  mixed           Path (string) or false if path param is not set.
     186     */
     187    function getPath($key='title')
    188188    {
    189189        if ($this->getParam('path')) {
     
    191191            $pathmark = '';
    192192            foreach ($this->pages as $page) {
    193                 $path .= oTxt($pathmark . strip_tags($page['title']), true);
     193                $path .= oTxt($pathmark . strip_tags($page[$key]), true);
    194194                $pathmark = $this->getParam('path_delimiter');
    195195            }
Note: See TracChangeset for help on using the changeset viewer.