Back to Top

Action Admin Breadcrumb Modifier

Updated 13 March 2025

In this blog, we will show you how to use the PrestaShop hook Action Admin Breadcrumb Modifier.

This hook is present in the Admin Controller, specifically at the bottom of the `initBreadcrumbs` function.

It executes before assigning the variable to the template, allowing you to modify it at runtime to suit your needs.

In the image above, it is clear that the admin breadcrumb is generated based on the specific controller and tab that are being used within the PrestaShop admin panel.

However, if you want to modify the default breadcrumb behavior. There is a hook action called action admin breadcrumb modifier.

Start your headless eCommerce
now.
Find out More

You can alter and customize the breadcrumbs content in the PrestaShop admin panel to better suit your needs.

  public function hookActionAdminBreadcrumbModifier($params)
  {
        $tabs = $params['tabs'];
        $breadcrumb = $params['breadcrumb'];

        foreach ($params['breadcrumb'] as &$item) {
            if ($item['name'] == 'Welcome') {
                $item['name'] = 'PrestaShop Home Screen';
                $item['icon'] = 'icon-Home';
                $item['href'] = '#';
            }

            if ($item['name'] == 'Dashboard') {
                $item['name'] = 'PrestaShop Home Dashboard';
                $item['icon'] = 'icon-dashboard';
                $item['href'] = '#';
            }
        }
    }

In the above code example, we have made several modifications to the breadcrumb navigation.

Specifically, we have changed the breadcrumb text from “Welcome to Prestashop Home Screen”. “Dashboard” to a more concise and unified “PrestaShop Home Dashboard”.

Additionally, we have updated the href attributes to ensure that the links point to the correct locations within the application.

action admin breadcrumb modifier
Admin breadcrumb after modification

Furthermore, we have also updated the icons. Associated with these breadcrumb items to better reflect their new designations. And improve the overall user experience.

By using the `hook_action_admin_breadcrumb_modifier`, you can also modify the tab content available in the parameters of the hook function.

That’s all.

If you are facing any issues or doubts in the above process, please feel free to contact us through the comment section.

I would be happy to help.

Also, you can explore our PrestaShop Development Services and a large range of quality PrestaShop Modules.

For any doubt contact us at [email protected].

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home