This file contains 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
Создание ресурсов пользователями через frontend | |
Используем сниппет FormLister | |
Вызов сниппета | |
[!FormLister? | |
&formid=`сontent` | |
&controller=`Content` | |
&from=`admin@[(site_name)]` |
This file contains 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
$formated = date('d.m.Y', $date); |
This file contains 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
http://docs.evo.im/03_extras/formlister/otpravka_pisem.html | |
Вызов формы в модальном окне | |
<div id="____Modal" class="modal fade"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header d-flex justify-content-between"> | |
<div class="modal-title">Элементы форм</div> | |
<button class="close" data-dismiss="modal" type="button"><i class="material-icons">close</i></button> | |
</div> |
This file contains 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
<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU" type="text/javascript"></script> | |
<div id="map" style="margin-bottom:14px; height:480px; width:100%;"></div> | |
<script type="text/javascript"> | |
ymaps.ready(function () { | |
var myMap = new ymaps.Map('map', { | |
center: [55.825558,37.431781], | |
zoom: 16 |
This file contains 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
1.устанавливаете плагин LiveReload в chrome | |
2. устанавливаете LiveReload в Sublime Text 3 | |
3. в Sublime Text 3 заходите в Preferences > Package Settings > LiveReload > Setting - Default | |
4. пишете | |
{ | |
"enabled_plugins": [ | |
"SimpleReloadPlugin", | |
"SimpleRefresh" | |
] | |
} |
This file contains 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
function switch_view(view){ | |
$.ajax({ | |
type: "POST", | |
url: "/assets/template/switch_view.php", | |
data: {"view": view}, | |
cache: false, | |
success: function(response){} | |
}); | |
} |
This file contains 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
$page = $modx->getObject('modResource', 3); | |
$rate = $page->getTVValue('rate'); |
This file contains 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
Создание динамического yml-файла | |
1. Создаем новый ресурс. | |
Название yml, псевдоним yml.xml, шаблон Пустой (blank), не показывать в меню, не кешируемый, не доступен для поиска, не использовать визуальный редактор, тип содержимого text/xml. | |
Документация deal.by | |
Документация Яндекс Маркет | |
Документация Яндекс Директ | |
В контент помещаем код: |
This file contains 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
/*********скрываем элемент при клике вне его***************/ | |
$(document).mouseup(function (e) { | |
var container = $("div.product"); | |
if (container.has(e.target).length === 0){ | |
$('.product-descr .tobuy').removeClass('tobuyClicked'); | |
$("div.product .hidden-block").fadeOut('slow'); | |
} | |
}); |