Ignore:
Timestamp:
Sep 15, 2014 9:44:27 PM (10 years ago)
Author:
anonymous
Message:

Beginning the process of adapting codebase to foundation styles.

File:
1 edited

Legend:

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

    r485 r497  
    254254                        // A crumb with no link.
    255255                        $breadcrumbs[] = array(
    256                             'url' => false,
    257                             'title' => sprintf($this->getParam('last_crumb_format'), $page['title'])
     256                            'url' => $_SERVER['REQUEST_URI'],
     257                            'title' => sprintf($this->getParam('last_crumb_format'), $page['title']),
     258                            'class' => 'current'
    258259                        );
    259260                    } else if ($crumb_count > $this->getParam('chop_breadcrumb_links')) {
     
    261262                        $breadcrumbs[] = array(
    262263                            'url' => $page['url'],
    263                             'title' => sprintf($this->getParam('last_crumb_format'), $page['title'])
     264                            'title' => sprintf($this->getParam('last_crumb_format'), $page['title']),
     265                            'class' => '',
    264266                        );
    265267                    }
     
    269271                        $breadcrumbs[] = array(
    270272                            'url' => false,
    271                             'title' => $page['title']
     273                            'title' => $page['title'],
     274                            'class' => 'unavailable',
    272275                        );
    273276                    } else {
     
    275278                        $breadcrumbs[] = array(
    276279                            'url' => $page['url'],
    277                             'title' => $page['title']
     280                            'title' => $page['title'],
     281                            'class' => '',
    278282                        );
    279283                    }
     
    334338    }
    335339
     340    /*
     341    *
     342    *
     343    * @access   public
     344    * @param
     345    * @return
     346    * @author   Quinn Comendant <quinn@strangecode.com>
     347    * @version  1.0
     348    * @since    07 Sep 2014 12:22:19
     349    */
     350    public function getBreadcrumbsUL()
     351    {
     352        $breadcrumbs = $this->getBreadcrumbsArray();
     353        if (!empty($breadcrumbs)) {
     354            ?><ul class="breadcrumbs"><?php
     355            foreach ($breadcrumbs as $b) {
     356                $printclass = '' != $b['class'] ? sprintf(' class="%s"', $b['class']) : '';
     357                printf('<li%s><a href="%s">%s</a></li>', $printclass, $b['url'], $b['title']);
     358            }
     359            ?></ul><?php
     360        }
     361        unset($key, $value);
     362    }
     363
    336364    /**
    337365     * Test if the given URI matches the URL of the current page. By default the URI is tested
Note: See TracChangeset for help on using the changeset viewer.