questo è il codice php pathway che ho integrato nelle relative pagine.php
Ho notato che nel percorso dei link viene omesso "index.php"
- BROWSE_HEADER_CATEGORY.TPL.PHP
- GARDEN_FLYPAGE.TPL.PHP (scheda prodoto)
--------------------------
<?php
if( $this->get_cfg( 'showPathway' )) {
echo "<div class=\"pathway\">$navigation_pathway</div>";
}
?>
--------------------------
- SHOP.BROWSE.PHP
------------------------
// 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 );
// 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
$tpl->set( 'category_id', $category_id );
$tpl->set( 'category_name', $category_name );
$browsepage_header = $tpl->fetch( 'browse/includes/browse_header_category.tpl.php' );
Infine il codice originale php della pagina
- PATHWAY.TPL.PHP...
-----------------------
<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); ?>
<?php
$catcount = 1;
$count = count( $pathway );
// Remove the link on the last pathway item
$pathway[ $count - 1 ]->link = '';
foreach( $pathway as $item ) { ?>
<?php if( !empty( $item->link ) ) : ?>
<?php echo $item->name ?>
<?php else: ?>
<?php echo $item->name ?>
<?php endif; ?>
<?php
if( $catcount < $count || $item->link != '') {
// This prints the separator image (uses the one from the template if available!)
// Cat1 * Cat2 * ...
echo vmCommonHTML:athway_separator();
}
$catcount++;
}
?>