PagesTree (Navipath)

kalanta

No avatar

2009-09-06 12:24

I would like to have in my navipath current page too. For example:

I am in homepage- (You are here: Homepage)
I am in products-new products (You are here: Homepage - Products - New Products or You are here: Products - New Products

» Quick.Cart v3.x

beholder

Avatar: beholder

2009-09-06 17:57

I was able to circumvent around this problem by taking navipath out from container.tpl and putting it to pages_default.tpl.

I would put it BEFORE the <div id="page"> and then add the $aData[sName] right behind the navipath link before navipath div closes. With some custom styling this will look like one nice full navipath like you want. The page name would not be clickable, though, why should it, you're on that particular page after all anyway.

kalanta

No avatar

2009-09-06 19:53

I know this solution, but I need other solution (PHP) at this time.

beholder

Avatar: beholder

2009-09-06 23:29

in actions_client/p.php there is a line:
$aData['sPagesTree'] = $oPage->throwPagesTree( $iContent );

After this line add another one:
$aData['sPagesTree'] .= '&nbsp;&raquo;&nbsp;<a href="?'.$oPage->aPages[$iContent]['sLinkName'].'">'.$aData['sName'].'</a>';

Tested. Works well. Thanks for helping me the other time.

kalanta

No avatar

2009-09-07 09:47

Yes, it works well, but... I would like to have this navipath visible than I am in product description page too. Now I don't see my top navipath - I have ProductsPagesTree only (I don't need this). I need my one navipath visible all the time in the same place. The navipath must be in container only.

beholder

Avatar: beholder

2009-09-07 16:16

I don't understand, come again?

kalanta

No avatar

2009-09-07 17:41

in this page you see the pages tree (navipath):

http://opensolution.org/Quick.Cart/demo/?en_high-mountain,16

but in this one (inside of product) you don't:

http://opensolution.org/Quick.Cart/demo/?4,en_tibet-(gore-tex-nubuck)

so I need to see pages tree (navipath) always.

cgan

Avatar: cgan

2009-09-07 22:13

Perhaps you'll find something useful in this topic:
http://opensolution.org/Quick.Cms/forum/?p=readTopic&nr=1124

cgan

beholder

Avatar: beholder

2009-09-07 22:41

Oh I see. Here is the code:
in actions_client/products.php, after line:
$aData['sPages'] = $oProduct->throwProductsPagesTree( $iProduct );
add following:


if ( empty($sPagesTree) && !empty($aData['sPages'] )) { 
   
$aData['sPagesTree'] = $aData['sPages'].'&nbsp;&raquo;&nbsp;<a href="?'.$iProduct.','.change2Url($aData['sName']).'">'.$aData['sName'].'</a>';
   
$sPagesTree $oTpl->tbHtml$config['default_pages_template'], 'PAGES_TREE' );
}

kalanta

No avatar

2009-09-08 08:42

Now it works perfectly, beholder. Thanks.

beholder

Avatar: beholder

2009-09-08 16:59

Oh, damn, Kalanta. Correct the code one more time, here u go:



in actions_client
/products.phpafter line:
$aData['sPages'] = $oProduct->throwProductsPagesTree$iProduct );
add following:

if ( empty(
$sPagesTree) && !empty($aData['sPages'] )) { 
   
$aData['sPagesTree'] = $aData['sPages'].'&nbsp;&raquo;&nbsp;<a href="?'.$iProduct.','.$sLanguageUrl.change2Url($aData['sName']).'">'.$aData['sName'].'< /a>';
   
$sPagesTree $oTpl->tbHtml$config['default_pages_template'], 'PAGES_TREE' );
}



I was working on older test version of QC and didn't take into account the language parameter.

Back to top
about us | contact