Skip to content

Instantly share code, notes, and snippets.

@EdwardIII
Created November 27, 2012 16:23
Show Gist options
  • Save EdwardIII/4155227 to your computer and use it in GitHub Desktop.
Save EdwardIII/4155227 to your computer and use it in GitHub Desktop.
function inject_root_to_crumbs(&$crumbs_in, $is_last_link){
var_dump($crumbs_in);
$out = array_splice($crumbs_in, 1, 0,
array ( "boutique" =>
array(
"label"=>
"Boutique",
"title"=>
"Go to back to Online Boutique Store",
"link"=>
"/buy-accessories",
"first"=>
NULL,
"last" =>
$is_last_link,
"readonly"=>
NULL
)
)
);
var_dump($out);
return $out;
}
if($crumbs['cms_page']['label'] == 'Boutique Store'){
unset($crumbs['cms_page']);
$crumbs = inject_root_to_crumbs($crumbs, true);
}else{ # ($this->getRequest()->getModuleName() != 'cms'){
$crumbs = inject_root_to_crumbs($crumbs, false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment