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
echo '<pre>';print_r($row);die; |
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 | |
$pdo = $modx->getService('pdoFetch'); | |
$modx->addPackage('seofilter', $modx->getOption('core_path') . 'components/seofilter/model/'); | |
$id = $modx->resource->id; | |
$seo_id = $modx->getPlaceholder('sf.seo_id'); | |
$tpl = '@INLINE <div class="filter_item filter_logo_item"> | |
<p><img src="{$logo}" alt="" /><span>{$name}</span></p> | |
</div>'; |
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
{set $today_date = '' | date : 'Y-m-d'} | |
{'!pdoResources' | snippet : [ | |
'parents' => 40437, | |
'tplWrapper' => 'wrapper.article.sale', | |
'tpl' => 'row.article.sale', | |
'includeTVs' => 'img_article,date_start,date_finish', | |
'tvPrefix' => '' | |
'where' => [ | |
'date_finish:>' => $today_date, |
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
{$publishedon | date : "d M Y" | rus_months} |
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
$resources = $modx->getCollection('modResource',array('parent' => 22)); | |
foreach ($resources as $res) { | |
$res->set('class_key', msProduct); | |
$res->save(); | |
} |
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
$id = $modx->resource->id; | |
$tpl = '@INLINE <a href="[[~[[+id]]]]">[[+pagetitle]]</a>'; | |
$pdo = $modx->getService('pdoFetch'); | |
$options = array( | |
'innerJoin' => array( | |
'msCategory' => array('on' => 'msCategoryMember.category_id = msCategory.id') | |
), |
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 | |
if (!$modx->user->isAuthenticated('mgr')) return; | |
$placeholders = $prefix ? array() : $modx->placeholders; | |
if ($prefix) { | |
foreach ($modx->placeholders as $key => $ph) { | |
if (strpos($key, $prefix) === 0) { | |
$placeholders[$key] = $ph; | |
} |
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
{'!mFilter2' | snippet : [ | |
'prepareSnippet' => 'prepareData' | |
]} |
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 | |
$output = $input; | |
$output = strtr($output, | |
array( | |
'а' => 'a', 'б' => 'b', 'в' => 'v', | |
'г' => 'g', 'д' => 'd', 'е' => 'e', | |
'ё' => 'e', 'ж' => 'zh', 'з' => 'z', | |
'и' => 'i', 'й' => 'ij', 'к' => 'k', | |
'л' => 'l', 'м' => 'm', 'н' => 'n', |
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
{foreach $cats as $cat} | |
<div class="section-option"> | |
<h5 class="mb-3">{$cat.name}</h5> | |
<ul class="list-group list-group-flush mb-3"> | |
{foreach $cat.items as $option} | |
<li class="list-group-item d-flex justify-content-between border-0 px-0 py-2"> | |
<span> | |
{$option.caption} | |
</span> | |
<span> |