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 | |
// Получаем все продукты (msProduct) | |
$products = $modx->getCollection('msProduct'); | |
// Проходим по каждому продукту | |
foreach ($products as $product) { | |
$productId = $product->get('id'); | |
$pageTitle = $product->get('pagetitle'); // Получаем pagetitle | |
// Находим первое изображение продукта (по rank = 0, первое по умолчанию) |
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
<div class="entry-content" itemprop="articleBody"> | |
<div class="table-of-contents open"><!--noindex--><div class="table-of-contents__header"><span class="table-of-contents__hide js-table-of-contents-hide">Содержание</span></div><ol class="table-of-contents__list js-table-of-contents-list"> | |
<li class="level-1"><a href="#polnotsennoe-vklyuchenie-fenom">Полноценное включение Fenom</a></li><li class="level-1"><a href="#sintaksis">Синтаксис</a></li><li class="level-3"><a href="#tegi-fastfield">Теги fastField</a></li><li class="level-3"><a href="#pleysholdery-s-tochkoy-ili-tire">Плейсхолдеры с точкой или тире</a></li><li class="level-3"><a href="#zapolnenie-pleysholderov">Заполнение плейсхолдеров</a></li><li class="level-3"><a href="#vyvod-snippetov-i-chankov">Вывод сниппетов и чанков</a></li><li class="level-3"><a href="#upravlenie-keshirovaniem">Управление кэшированием</a></li><li class="level-3"><a href="#proverka-avtorizatsii">Проверка авторизации</a></li><li class="level-3"><a href="#vyvod-informatsii-o |
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 | |
$tv = $modx->getObject('modTemplateVar', array('name' => $name)); | |
$elements = $tv->get('elements'); | |
$element = explode('||', $elements); | |
$els = array(); | |
foreach($element as $e) { | |
list($elName,$elId) = explode("==", $e); | |
$els[$elId] = $elName; | |
} | |
echo $els[$input]; |
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
<div itemscope itemtype="https://schema.org/ImageObject"> | |
<a itemprop="contentUrl" href="/assets/images/resources/758/gdm8-01.jpg" class="small-img" title="gdm8-01" data-toggle="lightbox" data-gallery="multiimages" data-title="gdm8-01"> | |
<img src="/assets/images/resources/758/118x118/gdm8-01.jpg" alt="Robustino GDM8" title="gdm8-01" width="118" height="118" itemprop="thumbnail"> | |
</a> | |
<span itemprop="name" class="hidden"></span> | |
<span itemprop="description" class="hidden"></span> | |
<span itemprop="caption" class="hidden"></span> | |
</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
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ | |
RewriteRule ^(.*)$ https://%1/$1 [L,R=301] | |
RewriteCond %{REQUEST_URI} !\? | |
RewriteCond %{REQUEST_URI} !\& | |
RewriteCond %{REQUEST_URI} !\= | |
RewriteCond %{REQUEST_URI} !\. | |
RewriteCond %{REQUEST_URI} ![^\/]$ |
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 echo mysql2date('d F Y', date('Y-m-d')); ?> |
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
yarn strapi admin:reset-user-password --email="YOUR_EMAIL" --password="YOUR_NEW_PASSWORD" |
NewerOlder