You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
I thought i might have found a post on this, but it seems im on my own with this one...
How can i modify the breadcrumbs include to display the 'Home' link when on the landing/slash page?
At the moment breadcrumbs only kick in once you click into a categoyr/product but i would like to display the Home link as soon as you land on the site.
Offline
You should be able to force them to always be displayed by modifying the "Breadcrumbs Display" XHTML include. You'll see a flag that controls whether or not the breadcrumbs should be displayed and you could force it to always be on. You'll end up with breadcrumbs on additional pages as a result of course but that simple change may meet your needs.
Offline
Hi Dave,
I've found the flag, but i don't have a clue how to force it to always be on, which would suit my needs perfectly.
Offline
$variablename = 1;
Offline
Where do i put this/what do i change Dave?
<?php $eol = $this->globals('khxc.eol'); $bc = $this->globals('ecom.breadcrumbs'); $links = ''; if (!(empty($bc))) { print '<div class="khxc_storelink">' . $eol; print '<p> ' . $eol; foreach ($bc as $num => $data) { $name = $data['name']; if ($name == 'STOREHOME') {$name = 'Home';} $link = $data['link']; $name = $this->xhtml_encode($name); if ($num != 0) {$links .= ' > ';} $links .= '<a href="' . $link . '" title="' . $name . '">' . $name . '</a>' . $eol; } // End of foreach statement. print $links . '</p>' . $eol . $eol; print '</div>' . $eol . $eol; } // End of if statement. ?>
Offline
Add $bc = 1; right before if (!(empty($bc))) {
Offline
I've already tried that one Dave and it returns an error?
Invalid argument supplied for foreach()
Offline
Ah, that indicates that there is no breadcrumb to be displayed (since it isn't expected to be there all the time). Restore the original logic that was there but leave your $bc = 1; there. This isn't going to solve your problem though since there isn't going to be anything in the breadcrumbs to be displayed.
You'd almost be better off leaving the existing logic and simply adding an else to display something.
Offline
Thanks Dave, yes i think an else statement would work, let me have a go at that, hopefully i'll be able to do this one
Offline
Well that was easy and does just what i want
Thanks again Dave
Offline