#1 Re: Developer Help » Breadcrumb not being called for module. » April 14, 2016 2:11pm

Thank you soo much.
The class name was misspelled in the developers section in big tree.
That fixed it.

#2 Developer Help » Breadcrumb not being called for module. » April 14, 2016 10:08am

mauriceRFU
Replies: 2

So I'm working on a custom module that has both individual episodes and an archive page.
I'm trying to get the breadcrumbs to display differently depending on if you're on the archive or episode.

This is the code I have thus far:
    class myEpisodes extends BigTreeModule {
        var $Table = "mytable";
        var $CategoryTable = "my_categories";
        var $RelTable      = "mytable_to_categories";
       
        var $PageLink = "";

        public function __construct() {
            global $cms;

            $this->PageLink = $cms->getLink(40);
        }


        public function get($item) {
            $item = parent::get($item);

            $item["link"] = $this->PageLink . $item["route"] . "/";

            return $item;
        }

        public function getBreadcrumb($page) {
            global $bigtree;

            $bc = array();
           
            if ($bigtree["routed_path"][0] == "archive") {
                $bc[] = array(
                    "title" => "Archive",
                    "link"  => "#"
                );
            } else if (isset($bigtree["commands"][0])) {
                $episode = $this->getByRoute($bigtree["commands"][0]);

                if ($episode) {
                    $bc[] = array(
                        "title" => $episode["title"],
                        "link"  => "#"
                    );
                }
            }
            return $bc;
        }
}
?>

The constructor function and get functions work fine.  They're called no problem.
The get breadcrumb function isn't being called.  At all.  I don't know why.  Anyone have any thoughts?

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.