Centaure Posted December 10 Share Posted December 10 (edited) Bonjour Je souhaite afficher le titre de la page CMS dans le breadcrumb.tpl quelle est le code à ajouter entre <h1> et </h1> ? Merci apr avance pour votre aide Edited December 13 by Centaure (see edit history) Link to comment Share on other sites More sharing options...
Prestashop Addict Posted December 10 Share Posted December 10 Merci de préciser la version de PS et PHP et le thème utilisé, pour qu'on puisse vous aider. Link to comment Share on other sites More sharing options...
Centaure Posted December 10 Author Share Posted December 10 pardon, je suis sous prestashop 8.1.7 et Leo Bikys's theme Link to comment Share on other sites More sharing options...
Centaure Posted December 10 Author Share Posted December 10 voici le code du fichier breadcrumb.tpl : <div class="bread-top"> {if isset($profile_params.leobcimg) && ($profile_params.leobcimg || $profile_params.breadcrumb.bgcolor)} <div data-depth="{$breadcrumb.count}" class="breadcrumb-bg {$profile_params.breadcrumb.textposition} {if $profile_params.breadcrumb.bgfull}breadcrumb-full{/if}" style="{if $profile_params.breadcrumb.bgcolor} background-color:{$profile_params.breadcrumb.bgcolor};{/if}{if $profile_params.breadcrumb.use_background}background-image: url({if $page.page_name == 'category' && $profile_params.breadcrumb.category == 'catimg' && isset($category.image.large.url) && $category.image.large.url != ''}{$category.image.large.url}{else if $profile_params.leobcimg}{$profile_params.leobcimg}{/if});{/if}{if $profile_params.breadcrumb.height} min-height:{$profile_params.breadcrumb.height};{/if} "> <h1></h1> {if isset($profile_params.breadcrumb.bgfull) && $profile_params.breadcrumb.bgfull} {/if} {if $page.page_name == 'category' } <h1 class="h1">{$category.name}</h1> {/if} <nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down"> <ol> {block name='breadcrumb'} {foreach from=$breadcrumb.links item=path name=breadcrumb} {block name='breadcrumb_item'} <li> {if not $smarty.foreach.breadcrumb.last} <a href="{$path.url}"><span>{$path.title}</span></a> {else} <span>{$path.title}</span> {/if} </li> {/block} {/foreach} {/block} </ol> </nav> {if isset($profile_params.breadcrumb.bgfull) && $profile_params.breadcrumb.bgfull} </div> {/if} </div> {else} {if $page.page_name == 'category'} {if !empty($category.image.large.url)} <div class="category-cover"> <img src="{$category.image.large.url}" alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}" loading="lazy"> </div> {/if} {else if $page.page_name == 'cms'} <div class="category-cover"> <img src="{$urls.img_url}BRCC.jpg" class="img-fluid" alt="Breadcrumb image"> </div> {else if $page.page_name == 'contact'} <div class="category-cover"> <img src="{$urls.img_url}BRCT.jpg" class="img-fluid" alt="Breadcrumb image"> </div> {else if $page.page_name == 'module-leoblog-blog' || $page.page_name == 'module-leoblog-category' || $page.page_name == 'module-leoblog-list'} <div class="category-cover"> <img src="{$urls.img_url}BRCB.jpg" class="img-fluid" alt="Breadcrumb image"> </div> {else} <div class="category-cover"> <img src="{$urls.img_url}BRCP.jpg" class="img-fluid" alt="Breadcrumb image"> </div> {/if} <div class="container"> <nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down"> <ol> {block name='breadcrumb'} {foreach from=$breadcrumb.links item=path name=breadcrumb} {block name='breadcrumb_item'} <li> {if not $smarty.foreach.breadcrumb.last} <a href="{$path.url}"><span>{$path.title}</span></a> {else} <span>{$path.title}</span> {/if} </li> {/block} {/foreach} {/block} </ol> </nav> {if $page.page_name == 'category' } <h1 class="h1">{$category.name}</h1> {else if $page.page_name == 'contact' } <h1 class="h1">{l s='Contact' d='Shop.Theme.Global'}</h1> {else if $page.page_name = 'cms'} {block name='page_title' hide} <header class="page-header"> <h1>{$smarty.block.child}</h1> </header> {/block} {/if} </div> {/if} </div> Link to comment Share on other sites More sharing options...
Prestashop Addict Posted December 10 Share Posted December 10 Hum, vous avez déjà des h1 dans le breadcrumb, et il est fortement déconseillé en SEO d'avoir plusieurs h1 sur la même pages sauf éventuellement s'il y a plusieurs sections. Link to comment Share on other sites More sharing options...
Centaure Posted December 10 Author Share Posted December 10 (edited) oui je sais un seul h1 mais il n'y en a pas dans les pages cms avec la configuration actuelle (voir ci-joint) et ce fichier breadcrumb.tpl Edited December 10 by Centaure (see edit history) Link to comment Share on other sites More sharing options...
Centaure Posted December 12 Author Share Posted December 12 bonjour, j'ai beau essayer pleins de variantes ... je trouve pas ... dans une page CMS, dans le fichier breadcrumb.tpl, je veux simplement afficher le titre H1 ... c'est quoi le code ? <h1 class="h1">{$page.page_title}</h1> <h1 class="h1">{$page.title}</h1> ne fonctionnent pas ... <h1 class="h1">{$cms.id}</h1> me revoie bien l'id mais <h1 class="h1">{$cms.title}</h1> me revoie rien Link to comment Share on other sites More sharing options...
Centaure Posted December 12 Author Share Posted December 12 ou comment récupérer le titre d'une page cms avec son id ? Link to comment Share on other sites More sharing options...
Prestashop Addict Posted December 12 Share Posted December 12 Ce n'est pas le breadcrumb.tpl, de base de classic, il faut donc voir avec le développeur du thème les variables qu'il initialise. Pour info le template de classic est le suivant: <nav data-depth="{$breadcrumb.count}" class="breadcrumb"> <ol> {block name='breadcrumb'} {foreach from=$breadcrumb.links item=path name=breadcrumb} {block name='breadcrumb_item'} <li> {if not $smarty.foreach.breadcrumb.last} <a href="{$path.url}"><span>{$path.title}</span></a> {else} <span>{$path.title}</span> {/if} </li> {/block} {/foreach} {/block} </ol> </nav> Link to comment Share on other sites More sharing options...
Centaure Posted December 12 Author Share Posted December 12 j'ai trouvé : <h1 class="h1"> {$cms.meta_titlehead_seo_title} </h1> ou <h1 class="h1"> {$cms.head_seo_title} </h1> Link to comment Share on other sites More sharing options...
Divine Posted December 13 Share Posted December 13 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now