Skip to content

Instantly share code, notes, and snippets.

@Dh42
Created February 25, 2020 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dh42/f6626dade511d81e8c7692bee1b73df1 to your computer and use it in GitHub Desktop.
Save Dh42/f6626dade511d81e8c7692bee1b73df1 to your computer and use it in GitHub Desktop.
PrestaShop bread crumb
{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!-- Breadcrumb -->
{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}
<div class="breadcrumb clearfix">
<a class="home" href="{$base_dir}" title="{l s='Return to Home'}">{l s='Home'}</a>
{if isset($path) AND $path}
<span class="navigation-pipe"{if isset($category) && isset($category->id_category) && $category->id_category == 1} style="display:none;"{/if}></span>
{if $path|strpos:'span' !== false}
<span class="navigation_page">{$path|@replace:'<span class="navigation-pipe">></span>':'<span class="navigation-pipe"></span>'|@replace:'<a ': '<span itemscope itemtype="https://schema.org/BreadcrumbList"><a itemprop="url" '|@replace:'data-gg="">': '><span itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem"> <meta itemprop="position" content="1" /><span itemprop="name">'|@replace:'</a>': '</span></span></a></span>'}</span>
{else}
{$path}
{/if}
{/if}
</div>
{if isset($smarty.get.search_query) && isset($smarty.get.results) && $smarty.get.results > 1 && isset($smarty.server.HTTP_REFERER)}
<div class="pull-right">
<strong>
{capture}{if isset($smarty.get.HTTP_REFERER) && $smarty.get.HTTP_REFERER}{$smarty.get.HTTP_REFERER}{elseif isset($smarty.server.HTTP_REFERER) && $smarty.server.HTTP_REFERER}{$smarty.server.HTTP_REFERER}{/if}{/capture}
<a href="{$smarty.capture.default|escape:'html':'UTF-8'|secureReferrer|regex_replace:'/[\?|&]content_only=1/':''}" name="back">
<i class="icon-chevron-left left"></i> {l s='Back to Search results for "%s" (%d other results)' sprintf=[$smarty.get.search_query,$smarty.get.results]}
</a>
</strong>
</div>
{/if}
<!-- /Breadcrumb -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment