General developer forum

 
 
Emperor Joshua Norton I, Emperor of the United States and Protector of Mexico.
Where is the breadcrumb trail generated?
 

We're using Moodle 2.3.2.

For some reason, the breadcrumb trail that should be appearing on all sub-pages within a course is not showing up in some places. I've confirmed that this is not a problem with our theme, since it happens with each theme that I switch to. So I'm wondering where in Moodle's source code the breadcrumb trail is initiated; I think that once I track that down, I can fix this bug. 

See this thread for screenshots of what is happening in our site.

As always, help, insight, hints, thoughts, smoke signals, etc., would be greatly appreciated. I'd like to emphasize that this is a priority for us, because the lack of the breadcrumb trail makes it difficult to navigate throughout the course. 

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Where is the breadcrumb trail generated?
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

What happens is that there is a backend class, called something like core_navigation, which builds the underlying navigation structure. (In an MVC pucture, it is the Model). You can get at it via $PAGE->nav

Then there are various view of that, including block_navigation and the breadcrumbs bar. I think the breadcrumbs are something like $PAGE->navbar.

Sorry, I am writing this off the top of my head without looking at the code, but the places to look are lib/navigationlib.php and lib/pagelib.php.

 
Average of ratings: -
Emperor Joshua Norton I, Emperor of the United States and Protector of Mexico.
Re: Where is the breadcrumb trail generated?
 

Thanks for the reply, Tim, I appreciate it. smile

I found the code I was looking for in lib/navigationlib.php. 

 
Average of ratings: -
Picture of Danny Wahl
Re: Where is the breadcrumb trail generated?
Group DevelopersGroup Particularly helpful Moodlers

it could still be the theme (or parent theme or all themes) IF the config for the page-layout for that page has nonavbar=>true

 
Average of ratings: -
Emperor Joshua Norton I, Emperor of the United States and Protector of Mexico.
Re: Where is the breadcrumb trail generated?
 

Thanks for the reply, Danny. I appreciate your time.

Turned out to be some extraneous code in lib/navigationlib.php which we had inserted ourselves. However, it didn't have our standard "// LOCAL HACK" comment, so it took us some time to find it.

 
Average of ratings: -