Tue 27 Oct |
|
Adding the Virtuemart Breadcrumbs to your Browse pages is not native to Virtuemart. Here are the steps and files needed to achieve this.
Even though the $navigation_pathway is shown as Browse Template variable the code to render it is missing from the shop.browse.php file as of VirtueMart 1.1.3.
The first step is to open file administrator/components/com_virtuemart/html/shop.browse.php and look for the the following code - // Set up the CMS pathway $category_list = array_reverse( $ps_product_category->get_navigation_list($category_id) ); $pathway = $ps_product_category->getPathway( $category_list ); $vm_mainframe->vmAppendPathway( $pathway );and then add below it - // Set the pathway for our template - $tpl->set( 'pathway', $pathway ); $navigation_pathway = $tpl->fetch( 'common/pathway.tpl.php'); $tpl->set( "navigation_pathway", $navigation_pathway );//add navigation_pathway to template Now we just need to add the variable call in our browse template so open components/com_virtuemart/themes/default/templates/browse/includes/browse_header_category.tpl.php and add the following snippet directly under the mm_showMyFileName(__FILE__);?> <?php if( $this->get_cfg( 'showPathway' )) { echo "<div class=\"pathway\">$navigation_pathway</div>"; } ?> Now the VirtueMart Breadcrumbs appear on your Browse (Category) pages. You can see it here www.gjcwebdesign.com/outdoor-tools/view-all-products. |
| Last Updated on Tuesday, 27 October 2009 18:31 Read : 2976 times |

Even though the $navigation_pathway is shown as Browse Template variable the code to render it is missing from the shop.browse.php file as of VirtueMart 1.1.3.



























