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
если у сниппета getImageList указывается id ресурса родителя &docid=`20` | |
{set $rows = 20 | resource : 'configurator' | fromJSON} | |
{foreach $rows as $row} | |
<h2>Конфигуратор</h2> | |
<h3>{$row.title}</h3> | |
<p>{$row.introtext}</p> | |
</div> | |
<div class="tm-firmware-panel-buttons"> | |
<a href="{$row.zip}" class="uk-button uk-button-primary tm-icon-zip"></a> |
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
{if $files|count != '1'} | |
{foreach $files as $file} | |
<li data-uk-slideshow-item="{$file['rank']}"><a href="#" style="background-image: url({$file['small']});"><!-- <img src="{$file['small']}"> --></a></li> | |
{/foreach} | |
{/if} |
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
<div class="uk-grid" data-uk-grid-margin> | |
<div class="uk-width-1-2 uk-row-first"> | |
{$_modx->resource.ad} | |
</div> | |
<div class="uk-width-1-2"> | |
<div class="google-map-container"> | |
<div id="propertyMap" class="propertyMap" language="ru" data-latitude="[[*coords:JSONtoChunk=`map_latitude`]]" data-longitude="[[*coords:JSONtoChunk=`map_longitude`]]"></div> | |
</div> | |
</div> | |
</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
{'!Sendex' | snippet : [ | |
'id' => '1' | |
'tplActivate' => 'tpl.Sendex.activate' | |
]} |
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
<title itemprop="name"> | |
{if $_modx->resource.seotitle == ''} | |
{$_modx->resource.pagetitle}{if $_modx->config.name_title == 1}{$_modx->config.separator_title}{$_modx->config.site_name}{/if} | |
{else} | |
{$_modx->resource.seotitle}{if $_modx->config.name_title == 1}{$_modx->config.separator_title}{$_modx->config.site_name}{/if} | |
{/if} | |
</title> | |
{if $_modx->resource.seokeywords != ''}<meta name="keywords" content="{$_modx->resource.seokeywords}">{/if} |
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
{'!pdoMenu' | snippet : [ | |
'parents' => '[[*context_key:is=`web`:then=`1`:else=`[[*context_key:is=`en`:then=`8`]]`]]', | |
'level' => '1', | |
'tplOuter' => '@INLINE <div class="dropdown">{{+wrapper}}</div>', | |
'tpl' => '@INLINE <p><a href="{{+link}}" {{+attributes}}>{{+menutitle}}</a></p>' | |
]} |
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 type="text/javascript" src="//code.jquery.com/ui/1.9.2/jquery-ui.js"></script> | |
<script type="text/javascript" src="https://github.com/niklasvh/html2canvas/releases/download/v0.5.0-beta4/html2canvas.js"></script> | |
<script type="text/javascript" src="https://cdn.rawgit.com/MrRio/jsPDF/master/dist/jspdf.min.js"></script> | |
<script type='text/javascript'> | |
function demoFromHTML() { | |
var pdf = new jsPDF('p', 'pt', 'letter'); | |
var options = {ignore}{background: '#fff'}{/ignore}; | |
var pdfContainer = $(".pdf"); |
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
//там ещё RTE подключается для определенные категорий ресуров) | |
//создаем плагин AceTv, событие на «OnDocFormRender» с кодом: | |
$script = ''; | |
$resource = ($resource instanceof modResource) | |
? | |
$modx->getObject('modResource',$resource->get('id')) | |
: $modx->getObject('modResource',(int)$resource); | |
// ACE |
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
<?php | |
define('ROOT', MODX_BASE_PATH); | |
define('EX', 'jpg,png,gif,jpeg,doc,xls,zip,pdf'); // Через запятую имена расширений (нижний регистр) | |
$folder=isset($folder) ? $folder : "assets/images/"; // папка назначения стыренного контента | |
if(!is_dir(MODX_BASE_PATH.$folder)) mkdir(MODX_BASE_PATH.$folder); | |
// Функция траслита | |
function rus2translit($string) { | |
$converter = array( | |
'а' => 'a', 'б' => 'b', 'в' => 'v', | |
'г' => 'g', 'д' => 'd', 'е' => 'e', |
OlderNewer