1 заметка с тегом

сделай сам

Гугл написал. Что сделано?

Получил письмо от Гугла:

Пришлось немного переделать шаблон design\themes\responsive\templates\common\breadcrumbs.tpl

Было:

<div itemscope="" itemtype="http://schema.org/BreadcrumbList" id="breadcrumbs" id="breadcrumbs_{$block.block_id}">

{if $breadcrumbs && $breadcrumbs|@sizeof > 1}
    <div class="ty-breadcrumbs clearfix">
        {strip}
        $level = 1
            {foreach from=$breadcrumbs item="bc" name="bcn" key="key"}
                {if $key != "0"}
                    <span class="ty-breadcrumbs__slash">/{$key}•{$level}/</span>
                {/if}
                {if $bc.link}
                    <span itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem"><a rel="nofollow" itemprop="item" href="{$bc.link|fn_url}" class="ty-breadcrumbs__a{if $additional_class} {$additional_class}{/if}"{if $bc.nofollow} rel="nofollow"{/if}><span itemprop="name">{$bc.title|strip_tags|escape:"html" nofilter}</span></a></span>
                {else}
                    <span class="ty-breadcrumbs__current"><bdi>{$bc.title|strip_tags|escape:"html" nofilter}</bdi></span>
                {/if}
                $level++
            {/foreach}
            {include file="common/view_tools.tpl"}
        {/strip}
    </div>
{/if}
<!--breadcrumbs_{$block.block_id}--></div>

стало:

<div id="breadcrumbs">

{if $breadcrumbs && $breadcrumbs|@sizeof > 1}
    <div class="ty-breadcrumbs clearfix">
        {strip}
        <ol itemscope="" itemtype="http://schema.org/BreadcrumbList">
            {foreach from=$breadcrumbs item="bc" name="bcn" key="key"}
                {if $key != "0"}
                    <span class="ty-breadcrumbs__slash">></span>
                {/if}
                {if $bc.link}
                    <li itemscope itemprop="itemListElement" itemtype="http://schema.org/ListItem"><a rel="nofollow" itemscope itemtype="https://schema.org/WebPage" itemprop="item" itemid="{$bc.link|fn_url}" href="{$bc.link|fn_url}" class="ty-breadcrumbs__a{if $additional_class} {$additional_class}{/if}"{if $bc.nofollow} rel="nofollow"{/if}><span itemprop="name">{$bc.title|strip_tags|escape:"html" nofilter}</span></a>
                        <meta itemprop="position" content="{$key}" />
                    </li>
                {else}
                    <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> <span itemprop="name" class="ty-breadcrumbs__current"><bdi>{$bc.title|strip_tags|escape:"html" nofilter}</bdi></span><meta itemprop="position" content="{$key}" /></li>
                {/if}
            {/foreach}
        </ol>
            {include file="common/view_tools.tpl"}
        {/strip}
    </div>
{/if}
<!--breadcrumbs_{$block.block_id}-->
</div>

Пришлось добавить и стили (тут для витрины sww.com.ru):

/* новый стиль для новых breadcrumbs 20/05/2020 */
.ty-breadcrumbs li {
    display: inline;
}
.ty-breadcrumbs ol {
    padding: 0;
    margin-top: 24px;
}
.ty-breadcrumbs {
    padding: 0;
    margin-top: -20px;
}
 Нет комментариев    42   1 мес   cs-cart   CSS   smarty   tpl   программирование   сделай сам