Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Микроразметка
- включить спецпеременную "gr_schema_org": true,
- json взять из 130 "Микроразметка Open Graph" и "Микроразметка schema.org" http://prntscr.com/166165s
- html:
- в head добавить
- {if $site.additional_work.open_graph}
- {assign var=meta_logo_width value=$site.header_block.logo_width|strip_tags|regex_replace:"/[^\d]/":""|default:90}
- {assign var=meta_logo_height value="-"}
- {if $mode == 'main'}
- <meta property="og:image" content="{$smarty.server.PROTOCOL}://{$smarty.server.HTTP_HOST}{s3_img width=$meta_logo_width height=$meta_logo_height method=c src=$site.header_block.site_logo.filename}"/>
- <meta property="og:type" content="website" />
- <meta property="og:title" content="{$page.title|strip_tags}"/>
- <meta property="og:description" content="{$page.description|escape}"/>
- <meta property="og:url" content="{$smarty.server.PROTOCOL}://{$smarty.server.HTTP_HOST}{$smarty.server.SCRIPT_URL}"/>
- {elseif $mode == "product"}
- <meta property="og:image" content="{s3_img src=$product.image_filename}"/>
- <meta property="og:type" content="website" />
- <meta property="og:title" content="{$product.name|default:$h1|default:$page.name}"/>
- <meta property="og:description" content="{$page.description|escape}"/>
- <meta property="og:url" content="{$smarty.server.PROTOCOL}://{$smarty.server.HTTP_HOST}{$smarty.server.SCRIPT_URL}"/>
- {elseif $mode == 'folder'}
- <meta property="og:image" content="{$smarty.server.PROTOCOL}://{$smarty.server.HTTP_HOST}{s3_img width=$meta_logo_width height=$meta_logo_height method=c src=$site.header_block.site_logo.filename}"/>
- <meta property="og:type" content="website" />
- <meta property="og:title" content="{$folder.folder_name}"/>
- <meta property="og:description" content="{$page.description|escape}"/>
- <meta property="og:url" content="{$smarty.server.PROTOCOL}://{$smarty.server.HTTP_HOST}{$smarty.server.SCRIPT_URL}"/>
- {else}
- <meta property="og:image" content="{$smarty.server.PROTOCOL}://{$smarty.server.HTTP_HOST}{s3_img width=$meta_logo_width height=$meta_logo_height method=c src=$site.header_block.site_logo.filename}"/>
- <meta property="og:type" content="website" />
- <meta property="og:title" content="{$h1|default:$page.h1|default:$page.name}"/>
- <meta property="og:description" content="{$page.description|escape}"/>
- <meta property="og:url" content="{$smarty.server.PROTOCOL}://{$smarty.server.HTTP_HOST}{$smarty.server.SCRIPT_URL}"/>
- {/if}
- {/if}
- http://prntscr.com/16bk86g тут, если отличается json логотипа - напишите свою
- В bottom.tpl (главная низ) - добавить код http://prntscr.com/16bkozx
- {if $site.additional_work.schema_org}
- <div class="hide">
- <div class="search" itemscope itemtype="https://schema.org/WebSite">
- <meta itemprop="url" content="{$smarty.server.PROTOCOL}://{$smarty.server.HTTP_HOST}"/>
- <form itemprop="potentialAction" itemscope itemtype="https://schema.org/SearchAction">
- <meta itemprop="target" content="{$smarty.server.PROTOCOL}://{$smarty.server.HTTP_HOST}{get_seo_url uri_prefix=$shop2.uri mode='search'}?search_text={ldelim}search_term_string{rdelim}"/>
- <input itemprop="query-input" type="text" id="search_string_query" name="search_term_string" required/>
- <input type="submit"/>
- </form >
- </div>
- </div>
- {/if}
- И в использовать хлебные крошки 130 шаблона добавив проверку на микроразметку - http://prntscr.com/16bkw2y
- {if $site.additional_work.schema_org}
- {include file="global:pagepath-2.2.130.tpl" schema_org=true path_separator="<span class='site-path__separator'>/</span>" class="site-path"}
- {else}
- {include file="global:pagepath-2.2.130.tpl" path_separator="<span class='site-path__separator'>/</span>" class="site-path"}
- {/if}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement