How to get menu tree from a node to build a customize breadcrumb? I would like to build a custom breadcrumb based on node relation from entity reference. For example there is a book node that has menu hierarchy:

Book
|-chapter 1
|--sub chapter 1.1
|---sub sub chapter 1.1.1
|----#Node with different content type and not included/displayed on Book
      Navigation


The Page Node (sub sub chapter 1.1.1) has entity reference relation with node biblio (for ex)

What I want is when I access biblio then the breadcrumb is displayed like the above tree.

Possible solution:
Write a code using nexus theme on template.php on function:

function nexus_breadcrumb($variables) {

  //$breadcrumb = $variables['breadcrumb'];
  //$node = $variables['node'];

  if ($node-&gt;type == 'biblio'){
   // pseudo code start
   // get 'book' node that point to biblio
   // get menu tree from the book node
   // construct the menu tree and assign it to $breadcrumb

   // this is I still not know how to code the section.
  }

  if (!empty($breadcrumb)) {
  // Use CSS to hide titile .element-invisible.
  $output = '&lt;h2 class="element-invisible"&gt;' . t('You are here') . '&lt;/h2&gt;';
   // comment below line to hide current page to breadcrumb

  $output .= '&lt;nav class="breadcrumb"&gt;' . implode(' » ', $breadcrumb) .   
   '&lt;/nav&gt;';
   return $output;
  } 
}


Any help will do. Thank you.
Menu Breadcrumb


  
  Append the page title to the breadcrumb (either as a clickable url or    not)
  Hide the breadcrumb if it only contains the link to the front    page. 
  Generate the breadcrumb from the URL structure if content does    not belong to a menu (7.x-1.6 and older only)
  


For more details click here

Custom Breadcrumbs


  Many new features have been added including support for Views, Panels,
  Taxonomy vocabularies and terms, paths, and a simple API that allows
  contributed modules to enable custom breadcrumbs for module pages and
  theme templates. These are implemented using optional, independent
  submodules that depend on the main Custom Breadcrumbs module.
  
  In addition to breadcrumb visibility, this version provides an option
  permitting PHP code snippets to be used in forming the breadcrumb
  titles and paths. Multiple languages are also supported.