What's New
- AuthorPosts
I think there is a bug in the breadcrumb module. I have an entry for ALL pages, but the breadcrumb is not shown on the blog homepage. To be sure I created a new entry just for the blog home, but it’s still not showing up. Looking at the Panda theme blog demo’s for Prestashop 1.7 I also see the breadcrumb missing, so it looks like a generic issue.
Prestashop version 1.7.3.2
Panda theme version 2.3.2Attachments:
Hi,
The breadcrumb was removed on blog homepage, if you want to show it, please modify the \modules\stblog\views\templates\front\default.tpl file, remove this code: {block name=’breadcrumb’}{/block}, see attached screenshot.
And your support license was expired period, please extend it to get prior support: https://www.sunnytoo.com/product/12-months-support-st-themes, we will stop support for customers whose support license was expired.
Best regards.Attachments:
Thanks for the fast reply and looking into it, even when my support expired. I did’t realize that so I ordered the 12 months support package.
Unfortunately removing that code block did not help. I removed it from the default.tpl and cleared all caches. The breadcrumb still is not showing on the blog homepage.
Hi,
Sorry, it requires to modify the \modules\stpagebanner\stpagebanner.php file, remove this code:&& $page_name != 'module-stblog-default'
, and add the following code in it, see attached screenshots:
'module-stblog-default' => array('id'=>'10_module-stblog-default', 'name'=>$this->getTranslator()->trans('Blog', array(), 'Shop.Theme.Panda'), 'title'=>$this->getTranslator()->trans('Blog', array(), 'Shop.Theme.Panda')),
Best regards.Attachments:
Hello,
I am having the same issue.PS 1.7.6.4 and Panda 2.4.9
In stpagebanner.php the current code is:
if(!$res && $page_name != 'index' && $page_name != 'pagenotfound')//&& $page_name != 'module-stblog-default'
However, I tried to do some logging right before this if statement and it is not even executed so it looks like the whole module does not get executed on the Blog’s home.The breadcrumb is set to be shown on all pages:
Modules > stpagebanner > Configure > BREADCRUMBS section > Page: allAny ideas how to fix it?
Thanks in advance
SzabeszThanks Yobo!
I commented it out like this: {*{block name=’breadcrumb’}{/block}*}
Now we have the breadcrumb on the Blog home but it is called “Home” which is rather misleading. Our blog is called “Latest”, its route is /latest, so the breadcrumb section should be named “Latest” as well. Is it perhaps configurable? I could not find such a config option anywhere. How can we chnage it?Thank you in advance,
SzabeszWell, now I see what the issue is with the breadcrumb on the Bog home. It only shows “Home”, which leads to the home page, and this is consistent with its behavior on all the other pages, of course.
However, on a blog category posts listing page, the breadcrumb becomes “Home > Latest > Expert Advice” which is technically true, but from this:
Home
visitors are lead to see this:
Home > Latest > Expert Advice
This is not good UX.I think Home should not be part of the breadcrumb anyway. I know that including it in the breadcrumb is common practice, but just because people keep copying each other it does not mean it is a smart idea.
The first item in the main menu is Home, the site’s logo in the header also leads to home. So adding another Home link to the breadcrumb is useless, confusing and takes up precious space.
Also, the Navigation pipe is sometimes appended to Home even when that is the only part of the breadcrumb. This happens on the main product category listing page, for example, but not on the Blog home page.
In short, what I need is:
– No breadcrumb on the site home (this is currently the case, of course)
– Home should never be prepended to the breadcrumb.
– Breadcrumb’s first part should be the name+route of the closest “(grand)parent” right under home. In other words, the first part should be the top level, which should not be Home.Are these all possible somehow?
Hi,
Please modify the \modules\stblog\controllers\front\default.php, add the following code:protected function getBreadcrumbLinks() { $breadcrumb = array(); $breadcrumb['links'][] = array( 'title' => $this->trans('Blog', array(), 'Shop.Theme.Panda'), 'url' => $this->context->link->getModuleLink('stblog', 'default'), ); return $breadcrumb; }
Best regards.
Attachments:
Thanks Yobo,
Using this hack I have almost achieved the required breadcrumb behavior. However, there is still one page which is a bit problematic: the page of ST Easy Checkout.
I set PrestaShop so that the site’s complete header and footer are on, and the checkout page should have the breadcrumb too, however, by default it is not added to the page.
One last tip to add the breadcrumb to the page of ST Easy Checkout please? Thanks in advance,
SzabeszHi,
Please modify the \themes\panda\templates\checkout\checkout.tpl file, add the following code:{block name='breadcrumb'} {hook h='displayBreadcrumb' page_name=$page.page_name} {/block}
And modify the \modules\steasycheckout\controllers\front\default.php file, add the following code:
protected function getBreadcrumbLinks() { $breadcrumb = parent::getBreadcrumbLinks(); $breadcrumb['links'][] = array( 'title' => $this->trans('Checkout', array(), 'Shop.Theme.Transformer'), 'url' => $this->context->link->getModuleLink('steasycheckout', 'default'), ); return $breadcrumb; }
See attached screenshots.
Best regards.Attachments:
Hello Yobo,
Actually, there is one issue with removing Home from the breadcrumb when debug mode is on.
Returning an empty array here:
\classes\controller\FrontController.php > getBreadcrumbLinks()
results in an error in getBreadcrumb()
because $breadcrumb[‘links’] is not available in an empty array.So in getBreadcrumb() I changed this:
$breadcrumb['count'] = count($breadcrumb['links']);
to
$breadcrumb['count'] = isset($breadcrumb['links']) ? count($breadcrumb['links']) : 0;
Is it ok or do you have a better idea perhaps?
- AuthorPosts
You must be logged in to reply to this topic.