Jump to content

Change {$path.title} of module page in breadcrumb


Recommended Posts

I'm having an issue where I've changed the URL of a module within it's settings, but the link label in the breadcrumb has remained the same and I don't know how to change it. There's no way to change it within the back office settings of the module like there was with the URL.

The module is PrestaHome's Blog for Prestashop. As you can see in the images the breadcrumb is directing to the new URL I set as 'journal' but it's still labelled as 'Blog'. I would like to label it as 'Journal' to match the URL.

312858111_Screenshot2020-01-26at22_16_35.thumb.png.b24646f0dc1aa67e054a28b4bcb3c2e9.png

 

 

 

 

 

 

 

514824384_Screenshot2020-01-26at22_19_47.png.7a62b88898af21190b0ee7aa14f580ca.png

 

 

 

I can see in the breacrumb.tpl that's it's puliing the name label {$path.title} from somewhere but I don't know where to find it.

{if not $smarty.foreach.breadcrumb.last}
<a itemprop="item" href="{$path.url}">
  {else}
  <span itemprop="item" content="{$path.url}">{/if}
  <span itemprop="name">{$path.title}</span>
{if not $smarty.foreach.breadcrumb.last}</a>{else}</span>{/if}

Please could someone advise where I can find the file I need to change so {$path.title} inserts the label 'Journal' instead of 'Blog'

Any help would be greatly apreciated,

Thanks,

Matt (Prestashop beginner)

Link to comment
Share on other sites

  • 10 months later...

Maybe you can edit the title on the list of controllers.
As an example;

 

public function getBreadcrumbLinks()
    {
        $breadcrumb = parent::getBreadcrumbLinks();
        $breadcrumb['links'][] = [
            'title' => $this->getTranslator()->trans('Publishers', [], 'Shop.Theme.Global'),
            'url' => $this->context->link->getPageLink('manufacturer', true),
        ];

		.
		.
		.

       
        return $breadcrumb;
    }

You just need to replace 'Publishers' with the label you want.

 

___

Sorry for my english.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...