This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.google.com/recaptcha/admin | |
1) Ставим компонент из репозитория и прописываем в настройках ключ. | |
2) | |
3) Вызов такой: | |
[[!AjaxForm? | |
&snippet=`FormIt` | |
&hooks=`recaptchav2,email,spam,FormItSaveForm` | |
&form=`tpl.AjaxForm` | |
&submitVar=`zayavka` | |
&emailTpl=`MyEmailChunk` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
в шаблон форму добавляем | |
<input type="hidden" name="pageurl" value="https://адрес-сайта.рф/[[~[[*id]]]]"> | |
и используем в чанке письма [[+pageurl]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[pdoMenu? | |
&startId=`21` | |
&level=`2` | |
&outerClass=`nav nav-pills flex-column` | |
&tplOuter=`@INLINE <ul[[+classes]] id="accordion1">[[+wrapper]]</ul>` | |
&tplInner=`@INLINE <ul[[+classes]]>[[+wrapper]]</ul>` | |
&tpl=`@INLINE <li[[+classes]]><a class="nav-link" href="[[+link]]" [[+attributes]]>[[+menutitle]]</a>[[+wrapper]]</li>` | |
&tplParentRow=`@INLINE <li[[+classes]]><a class="nav-link collapsed" href="#item-[[+id]]" [[+attributes]] data-toggle="collapse" href="#item-[[+id]]" data-parent="#accordion1" aria-expanded="false">[[+menutitle]]</a><div id="item-[[+id]]" class="collapse">[[+wrapper]]</div></li>` | |
&tplInnerRow=`@INLINE <li[[+classes]]><a data-toggle="collapse" href="[[+link]]" [[+attributes]] href="#item-[[+id]]" aria-expanded="false">[[+menutitle]]</a>[[+wrapper]]</li>` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Универсально | |
TITLE | |
<title>[[*seotitle:default=`[[If? &subject=`[[*longtitle]]` &operator=`empty` &then=`[[*pagetitle]]` &else=`[[*longtitle]]`]]`]] - [[++site_name]]</title> | |
DESCRIPTION | |
<meta name="Description" content="[[!If? &subject=`[[*description]]` &operator=`!empty` &then=`[[*description]]` &else=`[[*pagetitle]] в Москве. [[!If? &subject=`[[+price]]` &operator=`isnotempty` &then=`Стоимость: [[!parse_kurs? &price=`[[+price]]` ¤cy_tip=`[[+tip_currency:default=`[[+currency_tip]]`]]`]] р.` &else=`Низкая стоимость!`]] Быстрая доставка, скидки и спец предложения, сертификаты! Собственная сервисная служба.` ]]"> | |
С компонентом SEO Filter | |
<title>[[!+sf.title:default=`[[*seotitle:default=`[[!If? &subject=`[[*longtitle]]` &operator=`!empty` &then=`[[*longtitle]]` &else=`[[*pagetitle]] купить в Москве, лучшая цена! Выбрать [[!strtolower? &string=`[[*pagetitle]]`]] в каталоге с фото. Продажа от Компания Нейм`]]`]] - [[++site_name]]`]]</title> | |
<meta name="Description" content="[[!+sf.description:default=`[[* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Создаём документ xml | |
Содержание: | |
<?xml version="1.0" encoding="UTF-8"?> | |
<yml_catalog date="[[!time2]]" > | |
<shop> | |
<name>Название магазина</name> | |
<company>Название компании</company> | |
<url>https://site.ru</url> | |
<currencies> | |
<currency id="RUR" rate="1"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
На onsubmit ставить нет смысла. | |
Делаем так | |
[[!AjaxForm? | |
&snippet=`FormIt` | |
&hooks=`recaptchav2,email,spam,FormItSaveForm` | |
&form=`tpl.AjaxForm` | |
&submitVar=`callback` | |
&emailTpl=`MyEmailChunk` | |
&emailTo=`[email protected]` | |
&emailSubject=`Обратный звонок с сайта` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Выводим в шаблоне категории список товаров так: | |
[[!pdoPage? | |
&element=`msProducts` | |
&loadModels=`gallery` | |
&leftJoin=`{ | |
"360x270": {"class":"msProductFile","alias":"360x270", "on": "360x270.product_id = msProduct.id AND 360x270.path LIKE '%/360x270/' AND 360x270.rank=0"} | |
,"360x270x1": {"class":"msProductFile","alias":"360x270x1", "on": "360x270x1.product_id = msProduct.id AND 360x270x1.path LIKE '%/360x270/' AND 360x270x1.rank=1"} | |
}` | |
&select=`{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*Сниппет, проверяющий содержание формы на признаки спама*/ | |
//Определяем значения служебных переменных по умолчанию | |
$success=true; | |
$haserror=false; | |
//Массив запрещенных фрагментов строк | |
//Если в каком либо поле формы встретится один из ниже перечисленных фрагментов, то далее обрабатывать сообщение не будем | |
$forb=array( | |
'@', | |
'http', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta charset="utf-8"> | |
<title>[[*seotitle:default=`[[*pagetitle]]`]] - [[++site_name]]</title> | |
<meta name="description" content="[[*introtext:default=`[[*pagetitle]]. Официальный дилер. Гарантия.`]]"> | |
<base href="[[!siteurl]]" /> | |
<link rel="canonical" href="[[!siteurl]][[*url]]"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta property="og:locale" content="ru_RU" /> | |
<meta property="og:type" content="article"> | |
<meta property="og:site_name" content="[[++site_url]]"> | |
<meta property="og:title" content="[[*seotitle]]"> | |
<meta property="article:section" content="[[#[[*parent]].longtitle]]"> | |
<meta property="article:modified_time" content="[[*publishedon]]"> | |
<meta property="og:url" content="[[*id:is=`1`:then=`https://giftforanyone.ru/`:else=`[[++site_url]][[*uri]]`]]"> | |
<meta property="article:author" content="[[#[[*author]].pagetitle]]"> | |
<meta property="og:description" content="[[*description:default=`[[If? &subject=`[[*description]]` &operator=`empty` &then=`[[*pagetitle]]` &else=`[[*longtitle]]`]]`]] extra content."> | |
<meta property="og:image" content="[[++site_url]][[*picture]]"> |