What's New
You must be logged in to reply to this topic.
Hi,
Please modify the \controllers\front\listing\ManufacturerController.php file, add the following code:
protected function getBreadcrumbLinks()
{
$breadcrumb = parent::getBreadcrumbLinks();
if (Validate::isLoadedObject($this->manufacturer)) {
$breadcrumb['links'][] = array(
'title' => $this->manufacturer->name,
'url' => $this->context->link->getManufacturerLink($this->manufacturer->id),
);
}
return $breadcrumb;
}
See attached screenshot.
Best regards.
Hi,
Use the following code instead:
protected function getBreadcrumbLinks()
{
$breadcrumb = parent::getBreadcrumbLinks();
$breadcrumb['links'][] = array(
'title' => $this->trans(
'Manufacturers', array(), 'Shop.Theme.Catalog'
),
'url' => $this->context->link->getPageLink('manufacturer'),
);
if (Validate::isLoadedObject($this->manufacturer)) {
$breadcrumb['links'][] = array(
'title' => $this->manufacturer->name,
'url' => $this->context->link->getManufacturerLink($this->manufacturer->id),
);
}
return $breadcrumb;
}
Best regards.
Hi,
I checked your site, you selected two blog categories to use breadcrumb, they work fine:
https://beta.greenkoncepts.com/blog/1-home
https://beta.greenkoncepts.com/blog/6-events
If you want to show breadcrumb on the blog homepage, please select the “Blog”, see attached screenshot.
Best regards.
I am registered customer and using Transformer 4.5.3 on Prestashop 1.7.7.5.
I made changes described by you here and the breadcrumb of blog finally is here.
Namely I changed files:
\modules\stblog\views\templates\front\default.tpl
REMOVED: {block name=’breadcrumb’}{/block}
and
\modules\stpagebanner\stpagebanner.php
ADDED CODE:
‘module-stblog-default’ => array(‘id’=>’10_module-stblog-default’, ‘name’=>$this->getTranslator()->trans(‘Blog’, array(), ‘Shop.Theme.Transformer’), ‘title’=>$this->getTranslator()->trans(‘Blog’, array(), ‘Shop.Theme.Transformer’)),
But there is a BUG
The breadcrumb elements at the top of blog’s page are on wrong places (excahnged) and do not correspond the blog categories structure.
Please look screenshot. Could you correct the bug?
————————————————————————————
Also question 2.
Is it possible highlight selected item in blog menu? In this example Breast augmentation should have red color as clicked link. There was similar question on megamenu items highlighting, but I cannot find it on the forum. The reference to it also will be helpful.
My site s still on development stage on local server so I have no possibility give you access to site.
Thank you.
You must be logged in to reply to this topic.