Содержание
В текущей версии модуля Schema поддерживаются модули:
Текущая версия модуля Schema.org содержит в себе микроразметку таких типов:
Для установки нужно перейти в Панель управления - Главная - Редактор - Глобальные блоки:
Нажмите по кнопке "Добавить":
Как показано на примере, в поле "Код (ID)", пропишите название блока SHEMAORG и нажмите кнопку "Сохранить".
Далее перейдем в глобальный блок который мы создали и добавим следующий код:
<?if($URI_ID$='page1')?> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebSite", "url": "$HOME_PAGE_LINK$", "potentialAction": { "@type": "SearchAction", "target": "$HOME_PAGE_LINK$search?&q={q}", "query-input": "required name=q" } } </script> <?endif?> <?if($MODULE_ID$='index' && $URI_ID$!='page1')?> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Главная", "item": "$HOME_PAGE_LINK$" },{ "@type": "ListItem", "position": 2, "name": "$MODULE_NAME$", "item": "$HOME_PAGE_LINK$<?substr($REQUEST_URI$,1)?>" }] } </script> <?endif?> <?if($PAGE_ID$='category')?> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Главная", "item": "$HOME_PAGE_LINK$" },{ "@type": "ListItem", "position": 2, "name": "<?if($CAT_NAME$)?>$CAT_NAME$<?else?><?if($MODULE_ID$=='news')?>$TITLE_BAR$<?else?><?if($MODULE_ID$=='blog')?>$TITLE_BAR$<?endif?><?endif?><?endif?>", "item": "<?if($CAT_NAME$)?>$HOME_PAGE_LINK$<?substr($CAT_URL$,1)?><?else?>$HOME_PAGE_LINK$<?substr($REQUEST_URI$,1)?><?endif?>" }] } </script> <?endif?> <?if($MODULE_ID$='news' or $MODULE_ID$='blog' or $MODULE_ID$='publ' or $MODULE_ID$='load' or $MODULE_ID$='dir' or $MODULE_ID$='board' or $MODULE_ID$='stuff')?> <?if($PAGE_ID$='entry')?> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Главная", "item": "$HOME_PAGE_LINK$" },{ "@type": "ListItem", "position": 2, "name": "<?if($CAT_NAME$)?>$CAT_NAME$<?else?>$SECTION_NAME$<?endif?>", "item": "<?if($CAT_NAME$)?>$HOME_PAGE_LINK$<?substr($CAT_URL$,1)?><?else?>$HOME_PAGE_LINK$<?substr($SECTION_URL$,1)?><?endif?>" }] } </script> <?endif?><?endif?> <?if($MODULE_ID$='publ' or $MODULE_ID$='dir' or $MODULE_ID$='board')?> <?if($PAGE_ID$='entry')?> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "mainEntityOfPage": { "@type": "WebPage", "@id": "$HOME_PAGE_LINK$<?substr($ENTRY_URL$,1)?>" }, "headline": "<?if($MODULE_ID$='blog' or $MODULE_ID$='news')?><?$JSENCODE$($ENTRY_NAME$)?><?else?><?$JSENCODE$($ENTRY_TITLE$)?><?endif?>", "image": [ "<?if($IMG_URL1$)?>$HOME_PAGE_LINK$<?substr($IMG_URL1$,1)?><?endif?>", "<?if($IMG_URL2$)?>$HOME_PAGE_LINK$<?substr($IMG_URL2$,1)?><?endif?>", "<?if($IMG_URL3$)?>$HOME_PAGE_LINK$<?substr($IMG_URL3$,1)?><?endif?>", "<?if($IMG_URL4$)?>$HOME_PAGE_LINK$<?substr($IMG_URL4$,1)?><?endif?>", "<?if($IMG_URL5$)?>$HOME_PAGE_LINK$<?substr($IMG_URL5$,1)?><?endif?>", "<?if($IMG_URL6$)?>$HOME_PAGE_LINK$<?substr($IMG_URL6$,1)?><?endif?>", "<?if($IMG_URL7$)?>$HOME_PAGE_LINK$<?substr($IMG_URL7$,1)?><?endif?>", "<?if($IMG_URL8$)?>$HOME_PAGE_LINK$<?substr($IMG_URL8$,1)?><?endif?>", "<?if($IMG_URL9$)?>$HOME_PAGE_LINK$<?substr($IMG_URL9$,1)?><?endif?>", "<?if($IMG_URL10$)?>$HOME_PAGE_LINK$<?substr($IMG_URL10$,1)?><?endif?>" ], "datePublished": "$ADD_DATE$T$ADD_TIME$", "dateModified": "$MOD_DATE$T$MOD_TIME$", "author": { "@type": "Person", "name": "$USER$" }, "publisher": { "@type": "Organization", "name": "Blogas.info", "logo": { "@type": "ImageObject", "url": "ссылка на ваш логотип" } }, "description": "<?if($SOCIAL_DESCRIPTION$)?>$SOCIAL_DESCRIPTION$<?else?>$SEO_DESCRIPTION$<?endif?>" } </script> <?endif?><?endif?> <?if($MODULE_ID$='news')?> <?if($PAGE_ID$='entry')?> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "NewsArticle", "mainEntityOfPage": { "@type": "WebPage", "@id": "$HOME_PAGE_LINK$<?substr($ENTRY_URL$,1)?>" }, "headline": "<?if($MODULE_ID$='blog' or $MODULE_ID$='news')?><?$JSENCODE$($ENTRY_NAME$)?><?else?><?$JSENCODE$($ENTRY_TITLE$)?><?endif?>", "image": [ "<?if($IMG_URL1$)?>$HOME_PAGE_LINK$<?substr($IMG_URL1$,1)?><?endif?>", "<?if($IMG_URL2$)?>$HOME_PAGE_LINK$<?substr($IMG_URL2$,1)?><?endif?>", "<?if($IMG_URL3$)?>$HOME_PAGE_LINK$<?substr($IMG_URL3$,1)?><?endif?>", "<?if($IMG_URL4$)?>$HOME_PAGE_LINK$<?substr($IMG_URL4$,1)?><?endif?>", "<?if($IMG_URL5$)?>$HOME_PAGE_LINK$<?substr($IMG_URL5$,1)?><?endif?>", "<?if($IMG_URL6$)?>$HOME_PAGE_LINK$<?substr($IMG_URL6$,1)?><?endif?>", "<?if($IMG_URL7$)?>$HOME_PAGE_LINK$<?substr($IMG_URL7$,1)?><?endif?>", "<?if($IMG_URL8$)?>$HOME_PAGE_LINK$<?substr($IMG_URL8$,1)?><?endif?>", "<?if($IMG_URL9$)?>$HOME_PAGE_LINK$<?substr($IMG_URL9$,1)?><?endif?>", "<?if($IMG_URL10$)?>$HOME_PAGE_LINK$<?substr($IMG_URL10$,1)?><?endif?>" ], "datePublished": "$ADD_DATE$T$ADD_TIME$", "dateModified": "$MOD_DATE$T$MOD_TIME$", "author": { "@type": "Person", "name": "$USER$" }, "publisher": { "@type": "Organization", "name": "$SITE_NAME$", "logo": { "@type": "ImageObject", "url": "ссылка на ваш логотип" } }, "description": "<?if($SOCIAL_DESCRIPTION$)?>$SOCIAL_DESCRIPTION$<?else?>$SEO_DESCRIPTION$<?endif?>" } </script> <?endif?><?endif?> <?if($MODULE_ID$='blog')?> <?if($PAGE_ID$='entry')?> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BlogPosting", "mainEntityOfPage": { "@type": "WebPage", "@id": "$HOME_PAGE_LINK$<?substr($ENTRY_URL$,1)?>" }, "headline": "<?if($MODULE_ID$='blog' or $MODULE_ID$='news')?><?$JSENCODE$($ENTRY_NAME$)?><?else?><?$JSENCODE$($ENTRY_TITLE$)?><?endif?>", "image": [ "<?if($IMG_URL1$)?>$HOME_PAGE_LINK$<?substr($IMG_URL1$,1)?><?endif?>", "<?if($IMG_URL2$)?>$HOME_PAGE_LINK$<?substr($IMG_URL2$,1)?><?endif?>", "<?if($IMG_URL3$)?>$HOME_PAGE_LINK$<?substr($IMG_URL3$,1)?><?endif?>", "<?if($IMG_URL4$)?>$HOME_PAGE_LINK$<?substr($IMG_URL4$,1)?><?endif?>", "<?if($IMG_URL5$)?>$HOME_PAGE_LINK$<?substr($IMG_URL5$,1)?><?endif?>", "<?if($IMG_URL6$)?>$HOME_PAGE_LINK$<?substr($IMG_URL6$,1)?><?endif?>", "<?if($IMG_URL7$)?>$HOME_PAGE_LINK$<?substr($IMG_URL7$,1)?><?endif?>", "<?if($IMG_URL8$)?>$HOME_PAGE_LINK$<?substr($IMG_URL8$,1)?><?endif?>", "<?if($IMG_URL9$)?>$HOME_PAGE_LINK$<?substr($IMG_URL9$,1)?><?endif?>", "<?if($IMG_URL10$)?>$HOME_PAGE_LINK$<?substr($IMG_URL10$,1)?><?endif?>" ], "datePublished": "$ADD_DATE$T$ADD_TIME$", "dateModified": "$MOD_DATE$T$MOD_TIME$", "author": { "@type": "Person", "name": "$USER$" }, "publisher": { "@type": "Organization", "name": "$SITE_NAME$", "logo": { "@type": "ImageObject", "url": "ссылка на ваш логотип" } }, "description": "<?if($SOCIAL_DESCRIPTION$)?>$SOCIAL_DESCRIPTION$<?else?>$SEO_DESCRIPTION$<?endif?>" } </script> <?endif?><?endif?> <?if($MODULE_ID$='load')?> <?if($PAGE_ID$='entry')?> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "SoftwareApplication", "name": "<?$JSENCODE$($ENTRY_TITLE$)?>", "operatingSystem": "$OS$", "applicationCategory": "https://schema.org/GameApplication", "aggregateRating": { "@type": "AggregateRating", "ratingValue": "$RATING$", "ratingCount": "<?if($RATED$>=1)?>$RATED$<?else?>1<?endif?>" }, "offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" } } </script> <?endif?><?endif?> <?if($MODULE_ID$='video')?> <?if($PAGE_ID$='video_page')?> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "VideoObject", "name": "$ENTRY_TITLE$", "description": "$BRIEF$", "thumbnailUrl": [ "<?if($IMG_URL1$)?>$HOME_PAGE_LINK$<?substr($IMG_URL1$,1)?><?endif?>", "<?if($IMG_URL2$)?>$HOME_PAGE_LINK$<?substr($IMG_URL2$,1)?><?endif?>", "<?if($IMG_URL3$)?>$HOME_PAGE_LINK$<?substr($IMG_URL3$,1)?><?endif?>" ], "uploadDate": "$ADD_DATE$T$ADD_TIME$", "duration": "PT<?if(len($DURATION$)=8)?><?substr($DURATION$,0,2)?>H<?endif?><?substr($DURATION$,3,2)?>M<?substr($DURATION$,6,2)?>S", "contentUrl": "$HOME_PAGE_LINK$<?substr($ENTRY_URL$,1)?>", "embedUrl": "<?substr($EMBOBJECT$,39,strpos($EMBOBJECT$,"?")-39)?>", "interactionStatistic": { "@type": "InteractionCounter", "interactionType": { "@type": "http://schema.org/WatchAction" }, "userInteractionCount": "$AUTHOR_NAME$" } } </script> <?endif?><?endif?> <?if($MODULE_ID$='news' or $MODULE_ID$='blog' or $MODULE_ID$='publ' or $MODULE_ID$='load' or $MODULE_ID$='dir' or $MODULE_ID$='board' or $MODULE_ID$='stuff')?> <?if($PAGE_ID$='entry')?> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "ImageObject", "author": "$USER$", "contentLocation": "Ukraine", "contentUrl": "<?if($IMG_URL1$)?>$HOME_PAGE_LINK$<?substr($IMG_URL1$,1)?><?else?><?if($IMG_URL2$)?>$HOME_PAGE_LINK$<?substr($IMG_URL2$,1)?><?else?>$HOME_PAGE_LINK$<?substr($SOCIAL_IMAGE_SRC$,1)?><?endif?><?endif?>", "datePublished": "$ADD_DATE$", "description": "<?if($IMG1_ALT$)?>$IMG1_ALT$<?else?><?if($SEO_DESCRIPTION$)?>$SEO_DESCRIPTION$<?else?>$SOCIAL_DESCRIPTION$<?endif?><?endif?>", "name": "<?if($IMG1_TITLE$)?>$IMG1_TITLE$<?else?><?if($MODULE_ID$='blog' or $MODULE_ID$='news')?><?$JSENCODE$($ENTRY_NAME$)?><?else?><?$JSENCODE$($ENTRY_TITLE$)?><?endif?><?endif?>" } </script> <?endif?> <?endif?> <?if($MODULE_ID$='photo')?> <?if($PAGE_ID$='entry')?> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "ImageObject", "author": "$USER$", "contentLocation": "Ukraine", "contentUrl": "<?if($FULL_PHOTO_DIRECT_URL$)?><?substr($HOME_PAGE_LINK$,0,-1)?><?substr($FULL_PHOTO_DIRECT_URL$,0,strpos($FULL_PHOTO_DIRECT_URL$,"?"))?><?else?>$HOME_PAGE_LINK$<?substr($FULL_PHOTO_URL$,1)?><?endif?>", "datePublished": "$ADD_DATE$", "description": "$PHOTO_DESCR$", "name": "<?$JSENCODE$($PHOTO_NAME$)?>" } </script> <?endif?><?endif?> <?if($MODULE_ID$='shop')?> <?if($PAGE_ID$='entry')?> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Product", <?if($RATING$ > 0 and $RATED$ > 0)?> "aggregateRating": { "@type": "AggregateRating", "ratingValue": "$RATING$", "reviewCount": "$RATED$" }, <?endif?> "image": "$SERVER_PROTOCOL$//$SERVER_NAME$$PHOTO$", "name": "<?$JSENCODE$($ENTRY_TITLE$)?>", "description": "<?$JSENCODE$($BRIEF$)?>", <?if($BRAND$)?>"brand": "$BRAND$",<?endif?> <?if($ART_NO$)?>"sku": "$ART_NO$",<?endif?> "offers": { "@type": "Offer", "availability": <?if($STOCK$ > 0)?>"https://schema.org/InStock"<?else?>"https://schema.org/OutOfStock"<?endif?>, "price": "$PRICE_JS$", "priceCurrency": "$CURR_CODE$", "url": "$ENTRY_LINK$" } } </script> <?endif?><?endif?>
нажмите кнопку "Сохранить", практически готово.
После перейдите в Панель управления - Главная - Дизайн - "Замена участков кода".
В полу "Что", вставьте код:
</body> </html>
В поле "На", вставьте код:
$GLOBAL_SHEMAORG$ </body> </html>
и жмите кнопку "Сохранить". Модуль Schemaorg установлен на ваш сайт.
Важно!
Лицензия: CC BY-SA 4.0
Автор: Юрий Герук
Благодарность автору!