[eluser]woleium[/eluser]
OK, I worked it out - all it took was some sleep
Sometimes I surprise myself how thick I can be when I'm tired.
The documentation is incorrect.
Code:
$this->page->output_trail();
does not exist. The correct call is
Code:
$this->page->output_breadcrumb()
, however this just returns the actual trail, not the trail wrapped in a div as the docs suggest. The corect syntax is therefore:
Code:
<?php
//this bit in the controller or such
$this->page->set_crumb('foo','baz/foo');
$this->page->set_crumb('bar','baz/bar');
?>
<!-- this bit in the view file -->
<div id='breadcrumb'>
<?=$this->page->output_breadcrumb()?>
</div>
Adam: I'm not sure if you meant to write the output_trail function as a wrapper for output_breadcrumb or not, if so you haven't done it yet. It's such a small bit of code it's probably easier to write it than change the documentation, in fact here you go:
from modules/page/libraries/Page.php line 158
Code:
/**
* Output Wrapped Breadcrumb Trail
*
* @access public
* @param boolean $print Prints string to page instead of returning it
* @return string
*/
function output_trail($print=TRUE)
{
$output = '<div id="breadcrumb">';
$output .= $this->output_breadcrumb(FALSE);
$output .= '</div>';
// Print/Output trail
if ($print){
print $output;
return;
}
return $output;
}