classes/Layout/Breadcrumbs.php
public function smartBack()
    {

        // If we are on a listing page (an odd length), do the normal stuff
        // http://stackoverflow.com/a/9153969/59160
        if (count($this->links) & 1) {
            return $this->back();
        }

        // If we're on the first level detail page, do normal stuff
        if (count($this->links) === 2) {
            return $this->back();
        }

        // Otherwise, skip the previous (the listing) and go direct to the previous detail
        $urls = array_keys($this->links);

        return $urls[count($urls) - 3];
    }
public function smartBack()
    {

        // If we are on a listing page (an odd length), do the normal stuff
        // http://stackoverflow.com/a/9153969/59160
        if (count($this->links) & 1) {
            return $this->back();
        }

        // If we're on the first level detail page, do normal stuff
        if (count($this->links) === 2) {
            return $this->back();
        }

        // Otherwise, skip the previous (the listing) and go direct to the previous detail
        $urls = array_keys($this->links);

        return $urls[count($urls) - 3];
    }
public function smartBack ( ) { // If we are on a listing page (an odd length), do the normal stuff // http://stackoverflow.com/a/9153969/59160 if ( count ( $ this -> links ) & 1 ) { return $ this -> back ( ) ; } // If we're on the first level detail page, do normal stuff if ( count ( $ this -> links ) === 2 ) { return $ this -> back ( ) ; } // Otherwise, skip the previous (the listing) and go direct to the previous detail $ urls = array_keys ( $ this -> links ) ; return $ urls [ count ( $ urls ) - 3 ] ; }
If hitting back from a child detail page, goes to the parent detail page
rather than to the child listing page.  For instance, if you are editing
the slides of a news page, when you go "back", it's back to the news page
and not the listing of the news slides

@return string
If hitting back from a child detail page goes to the parent detail page rather than to the child listing page . For instance if you are editing the slides of a news page when you go back it s back to the news page and not the listing of the news slides