Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding a 'subpath' to breadcrumbs


dahui

Recommended Posts

hello community

 

I do have a question concerning breadcrumbs.

 

Please have a look at my dev-site

 

as you see the bradcrumbs propperly show 'Start ? Information', when you click e.g on the first link in listing 'Navigation im Elflein Kosmetik OnlineShop' the bradcrumbs look like this:

'Start ? Shopanleitung (Navigation)'

 

I tried a lot and seeked the board but do not get around to make them bradcrumbs show:

'Start ? Information ? Shopanleitung (Navigation)'

 

please help ;-)

dahui

Link to comment
Share on other sites

In your Navigation page, you will see a line that looks something like this:

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NAVIGATION));

 

You want to precede it with something like:

 

$breadcrumb->add("Information", tep_href_link(FILENAME_INFORMATION));

Link to comment
Share on other sites

I play around with those bradcrumbs for hours ...

and found a quick and drity solution which would be

 

$breadcrumb->add('<a href="' . tep_href_link(FILENAME_INFORMATION) . '"> Information</a> ? ' .

 

in my case

but for sure there must be a posibillity to modify the breadcrumb class, instead of changing it manually to the code above for every site under "Information"

 

greetz

dahui

Link to comment
Share on other sites

My suggestion does work - I do this myself. 

 

Please post the code you used.

 

 

I had eypressed my self wrong stevel and than Iposted the wrong code

 

waht I wanted was all sites listed in Information on top left on my dev site

 

to show a breadcumb like

 

start > information > sitename

 

and now I achived it by changeing it to

 

 
 $breadcrumb->add('<a href="' . tep_href_link(FILENAME_INFORMATION) . '"> Information</a> ? ' . NAVBAR_TITLE, tep_href_link(FILENAME_SHOPGUIDE));

 

yrs workz of course and shows the inforamtion linked propperly

 

dahui

Link to comment
Share on other sites

Well, yours makes the two names and the arrow into a link, and then makes Information a link within a link. If that makes you happy, then that's fine. But it's not the cleanest approach.

Link to comment
Share on other sites

Well, yours makes the two names and the arrow into a link, and then makes Information a link within a link.  If that makes you happy, then that's fine. But it's not the cleanest approach.

 

I see what you mean, but just with

  $breadcrumb->add("Information", tep_href_link(FILENAME_INFORMATION));

it misses out the file itself at the end and I was not able to buidl an array for information and than the actual file aftwards

 

I know it is not propper but it wokz on http://funjumping.de/shop/shopguide_nav.php for example.

 

any clean solution would be appreciated ;)

 

dahui

Link to comment
Share on other sites

I think you misunderstood. You need TWO lines:

 

$breadcrumb->add("Information", tep_href_link(FILENAME_INFORMATION));
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPGUIDE));

Link to comment
Share on other sites

I think you misunderstood.  You need TWO lines:

 

$breadcrumb->add("Information", tep_href_link(FILENAME_INFORMATION));
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPGUIDE));

 

omg stevel so sorry to bother you, yes I did misunderstood, works perfect! thx

but now you can see I am an absolut newbie to php, anything I achieved was by trial and error!

 

thx again stevel, now the logic is clearer to me as well!

 

dahui

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...