@dbltoe
Hi there,
I got involved in a conversation on another thread about breadcrumbs that proved what I believed to be wrong Anyway I had a look at this mod again and I see that it kind of messes up the breadcrumbs.
this is the chunk of code at fault:
Code:
while (!$subcategories_tab->EOF)
{
$cPath_new=zen_get_path($subcategories_tab->fields['categories_id']);
$cPath_new=str_replace('=0_', '=', $cPath_new);
$cPath_new="cPath=".$subcategories_tab->fields['categories_id'];
echo '<li>'.'<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">'.$subcategories_tab->fields['categories_name'].'</a></li>';
$subcategories_tab->MoveNext();
}
Basically the links are being created with only the most 'recent' category. I think this works better.
Code:
while (!$subcategories_tab->EOF)
{
$cPath_new = "cPath=".zen_get_generated_category_path_rev($subcategories_tab->fields['categories_id']);
echo '<li>'.'<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">'.$subcategories_tab->fields['categories_name'].'</a></li>';
$subcategories_tab->MoveNext();
}
Which creates links in the format "cPath=2_11" rather than just "cPath=11". Both will get you to the right place but the first one will result in a correct breadcrumb.
Bookmarks