Jump to content

Removing breadcrumbs on product page


Solodin

Recommended Posts

  • 3 months later...
  • 1 year later...
  • 2 years later...

I want to hide breadcrumb only on product page but in prestaShop 1.6.1.9 it is not like that . 

The breadcrumbs in the newest ps 1.6 version are in header.tpl in 120 line and  it's like this:
 

{if $page_name !='index' && $page_name !='pagenotfound'}
{include file="$tpl_dir./breadcrumb.tpl"}
{/if}

How block displaying breadcrumbs inside IF ?
page_name ? or somethink else ? 

Edited by IgorDev (see edit history)
Link to comment
Share on other sites

  • 1 year later...
hace 7 horas, whoopzies dijo:

hello i try to find the 


{include file="$tpl_dir./breadcrumb.tpl"} 

but i cant find it in my tamplate:( 

i look in product.tpl and in header.tpl 

but nop nathing 

 

eny one help 

 

Indicates the version of Prestashop you use and if you use the template by default.

You can hide by CSS in a simple way

In Prestashop 1.7.3.3 in the /themes/classic/assets/css/custom.css add

#product .breadcrumb {display:none;}

Other option

/themes/classic/templates/_partials/breadcrumb.tpl

Search code

 

<nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down">
  <ol itemscope itemtype="http://schema.org/BreadcrumbList">
    {foreach from=$breadcrumb.links item=path name=breadcrumb}
      {block name='breadcrumb_item'}
        <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
          <a itemprop="item" href="{$path.url}">
            <span itemprop="name">{$path.title}</span>
          </a>
          <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}">
        </li>
      {/block}
    {/foreach}
  </ol>
</nav>

Change by 

{if $page.page_name!='product'}
<nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down">
  <ol itemscope itemtype="http://schema.org/BreadcrumbList">
    {foreach from=$breadcrumb.links item=path name=breadcrumb}
      {block name='breadcrumb_item'}
        <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
          <a itemprop="item" href="{$path.url}">
            <span itemprop="name">{$path.title}</span>
          </a>
          <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}">
        </li>
      {/block}
    {/foreach}
  </ol>
</nav>
{/if}

Other option:

File -> \themes\classic\templates\layouts\layout-both-columns.tpl

Search 

{block name='breadcrumb'}
            {include file='_partials/breadcrumb.tpl'}
          {/block}

Change by

  {if $page.page_name!='product'}  {include file='_partials/breadcrumb.tpl'} {/if}

Sorry for my English

Edited by nadie
update (see edit history)
Link to comment
Share on other sites

7 hours ago, nadie said:

Indicates the version of Prestashop you use and if you use the template by default.

You can hide by CSS in a simple way

In Prestashop 1.7.3.3 in the /themes/classic/assets/css/custom.css add


#product .breadcrumb {display:none;}

Other option


/themes/classic/templates/_partials/breadcrumb.tpl

Search code

 


<nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down">
  <ol itemscope itemtype="http://schema.org/BreadcrumbList">
    {foreach from=$breadcrumb.links item=path name=breadcrumb}
      {block name='breadcrumb_item'}
        <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
          <a itemprop="item" href="{$path.url}">
            <span itemprop="name">{$path.title}</span>
          </a>
          <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}">
        </li>
      {/block}
    {/foreach}
  </ol>
</nav>

Change by 


{if $page.page_name!='product'}
<nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down">
  <ol itemscope itemtype="http://schema.org/BreadcrumbList">
    {foreach from=$breadcrumb.links item=path name=breadcrumb}
      {block name='breadcrumb_item'}
        <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
          <a itemprop="item" href="{$path.url}">
            <span itemprop="name">{$path.title}</span>
          </a>
          <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}">
        </li>
      {/block}
    {/foreach}
  </ol>
</nav>
{/if}

Sorry for my English

 

hello my englis is also not zo good but i understand 

i use 1.6 

1.7 is for my not good becorse the tamplate is not ready and lots of modules i use are not ready 

and i dont like to spand again all of the € as i dit when i start the shop :)

but i will try to do the ccs code thnx for your time 

 

greetings 

Link to comment
Share on other sites

hace 20 minutos, whoopzies dijo:

 

hello my englis is also not zo good but i understand 

i use 1.6 

1.7 is for my not good becorse the tamplate is not ready and lots of modules i use are not ready 

and i dont like to spand again all of the € as i dit when i start the shop :)

but i will try to do the ccs code thnx for your time 

 

greetings 

 

If you use Prestashop 1.6..

You must have in the file -> /themes/Your-Template/header.tpl a call to breadcrumb

Code in Prestashop 1.6 with default template

{if $page_name !='index' && $page_name !='pagenotfound'}
						{include file="$tpl_dir./breadcrumb.tpl"}
					{/if}

Change by

En 28/11/2016 a las 9:54 AM, rocky dijo:

Change it to:


{if $page_name != 'index' && $page_name != 'pagenotfound' && $page_name != 'product'}
{include file="$tpl_dir./breadcrumb.tpl"}
{/if}

 

Other option 

File -> /themes/Your-Template/breadcrumb.tpl

Search

{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}
<div class="breadcrumb clearfix">
	<a class="home" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}"><i class="icon-home"></i></a>
	{if isset($path) AND $path}
		<span class="navigation-pipe"{if isset($category) && isset($category->id_category) && $category->id_category == (int)Configuration::get('PS_ROOT_CATEGORY')} style="display:none;"{/if}>{$navigationPipe|escape:'html':'UTF-8'}</span>
		{if $path|strpos:'span' !== false}
			<span class="navigation_page">{$path|@replace:'<a ': '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" '|@replace:'data-gg="">': '><span itemprop="title">'|@replace:'</a>': '</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}

Change by

{if $page_name!='product'}
{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}
<div class="breadcrumb clearfix">
	<a class="home" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}"><i class="icon-home"></i></a>
	{if isset($path) AND $path}
		<span class="navigation-pipe"{if isset($category) && isset($category->id_category) && $category->id_category == (int)Configuration::get('PS_ROOT_CATEGORY')} style="display:none;"{/if}>{$navigationPipe|escape:'html':'UTF-8'}</span>
		{if $path|strpos:'span' !== false}
			<span class="navigation_page">{$path|@replace:'<a ': '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" '|@replace:'data-gg="">': '><span itemprop="title">'|@replace:'</a>': '</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}
{/if}

Sorry for my English

  • Thanks 1
Link to comment
Share on other sites

yee thnx man its working 

and i see i have also modules form you :) cool haha 

 

i have one more qwestion about presta 

the out of stock text color how do i chanes it becorse i cant see text in the red eria 

see pic 

 

thnx a lot 

 

greetings 

 

 

Schermafdruk 2018-06-10 00.51.25.png

Schermafdruk 2018-06-10 00.51.53.png

Link to comment
Share on other sites

yee thnx man its working 

and i see i have also modules form you :) cool haha 

 

i have one more qwestion about presta 

the out of stock text color how do i chanes it becorse i cant see text in the red eria 

see pic 

 

thnx a lot 

 

greetings 

 

 

Schermafdruk 2018-06-10 00.51.25.png

Schermafdruk 2018-06-10 00.51.53.png

 

  • Haha 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...
On 6/9/2018 at 4:52 PM, nadie said:

Indicates the version of Prestashop you use and if you use the template by default.

You can hide by CSS in a simple way

In Prestashop 1.7.3.3 in the /themes/classic/assets/css/custom.css add


#product .breadcrumb {display:none;}

Other option


/themes/classic/templates/_partials/breadcrumb.tpl

Search code

 


<nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down">
  <ol itemscope itemtype="http://schema.org/BreadcrumbList">
    {foreach from=$breadcrumb.links item=path name=breadcrumb}
      {block name='breadcrumb_item'}
        <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
          <a itemprop="item" href="{$path.url}">
            <span itemprop="name">{$path.title}</span>
          </a>
          <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}">
        </li>
      {/block}
    {/foreach}
  </ol>
</nav>

Change by 


{if $page.page_name!='product'}
<nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down">
  <ol itemscope itemtype="http://schema.org/BreadcrumbList">
    {foreach from=$breadcrumb.links item=path name=breadcrumb}
      {block name='breadcrumb_item'}
        <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
          <a itemprop="item" href="{$path.url}">
            <span itemprop="name">{$path.title}</span>
          </a>
          <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}">
        </li>
      {/block}
    {/foreach}
  </ol>
</nav>
{/if}

Other option:

File -> \themes\classic\templates\layouts\layout-both-columns.tpl

Search 


{block name='breadcrumb'}
            {include file='_partials/breadcrumb.tpl'}
          {/block}

Change by


  {if $page.page_name!='product'}  {include file='_partials/breadcrumb.tpl'} {/if}

Sorry for my English

works like a charm! thanks a lot

Link to comment
Share on other sites

  • 1 month later...

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...