Skip to content

Instantly share code, notes, and snippets.

@Sentinel-7
Sentinel-7 / head.chunk.php
Created August 21, 2017 07:36
Чанк head
<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}
@Sentinel-7
Sentinel-7 / Sendex snippet
Last active August 17, 2017 13:15
modal uikit onload
{'!Sendex' | snippet : [
'id' => '1'
'tplActivate' => 'tpl.Sendex.activate'
]}
@Sentinel-7
Sentinel-7 / contact.tpl
Last active August 16, 2017 06:11
MapsTv 3 google maps on 1 page marker + API system key
<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>
@Sentinel-7
Sentinel-7 / чанк tpl.msGallery.dtls
Created August 2, 2017 14:43
Скрываем превью в msGallery
{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}
@Sentinel-7
Sentinel-7 / MIGX fenom
Last active July 14, 2021 13:25
MIGX fenom
если у сниппета 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>