concrete/src/Html/Service/Navigation.php
public function getTrailToCollection($c)
    {
        $db = Database::connection();

        $cArray = array();
        $currentcParentID = $c->getCollectionParentID();
        if ($currentcParentID > 0) {
            while (is_numeric($currentcParentID) && $currentcParentID > 0 && $currentcParentID) {
                $q = "select cID, cParentID from Pages where cID = '{$currentcParentID}'";
                $r = $db->query($q);
                $row = $r->fetchRow();
                if ($row['cID']) {
                    $cArray[] = Page::getByID($row['cID'], 'ACTIVE');
                }

                $currentcParentID = $row['cParentID']; // moving up the tree until we hit 1
            }
        }

        return $cArray;
    }
public function getTrailToCollection($c)
    {
        $db = Database::connection();

        $cArray = array();
        $currentcParentID = $c->getCollectionParentID();
        if ($currentcParentID > 0) {
            while (is_numeric($currentcParentID) && $currentcParentID > 0 && $currentcParentID) {
                $q = "select cID, cParentID from Pages where cID = '{$currentcParentID}'";
                $r = $db->query($q);
                $row = $r->fetchRow();
                if ($row['cID']) {
                    $cArray[] = Page::getByID($row['cID'], 'ACTIVE');
                }

                $currentcParentID = $row['cParentID']; // moving up the tree until we hit 1
            }
        }

        return $cArray;
    }
public function getTrailToCollection ( $ c ) { $ db = Database :: connection ( ) ; $ cArray = array ( ) ; $ currentcParentID = $ c -> getCollectionParentID ( ) ; if ( $ currentcParentID > 0 ) { while ( is_numeric ( $ currentcParentID ) && $ currentcParentID > 0 && $ currentcParentID ) { $ q = "select cID, cParentID from Pages where cID = '{$currentcParentID}'" ; $ r = $ db -> query ( $ q ) ; $ row = $ r -> fetchRow ( ) ; if ( $ row [ 'cID' ] ) { $ cArray [ ] = Page :: getByID ( $ row [ 'cID' ] , 'ACTIVE' ) ; } $ currentcParentID = $ row [ 'cParentID' ] ; // moving up the tree until we hit 1 } } return $ cArray ; }
Returns an array of collections as a breadcrumb to the current page.

@param Page $c

@return Page[]
Returns an array of collections as a breadcrumb to the current page .