С помощью OnBeforeProlog появляется на странице сайта.Просто описал - через что вывожу.
lib/templates это ошибкаЯ в курсе, временно лежит для проверки работоспособность.
{$_modx->runSnippet('!pdoPage', [
'parents' =>$_modx->resource.id,
'limit' =>20,
'templates' =>5,
'showHidden' =>0,
'processTVs' =>1,
'includeTVs' =>'tv_info,tv_price,tv_square,tv_rooms,tv_floor,array_gallery,tv_img',
'tvPrefix' =>'',
'sortby' =>'{"menuindex":"desc"}',
'select' =>'{"modResource":"id,pagetitle,longtitle,parent,limit"}',
'where' =>'{"tv_info":"2"}',
'ajaxMode' =>'default',
'ajaxElemWrapper' =>'#block-projects',
'ajaxElemRows' =>'#block-projects .block-projects-row',
'ajaxElemPagination'=>'#block-projects .pagination',
'ajaxElemLink' =>'#block-projects .pagination a',
'tplPageWrapper' =>'@INLINE <div class="block-projects-pagination d-flex justify-content-center"><ul class="pagination">[[+pages]]</ul></div>',
'tplPage' =>'@INLINE <li class="page-item"><a href="[[+href]]" class="page-link">[[+pageNo]]</a></li>',
'tplPageActive' =>'@INLINE <li class="page-item active"><a href="[[+href]]" class="page-link">[[+pageNo]]</a></li>',
'tplPageFirst' =>'@INLINE <li class="page-item control"><a href="[[+href]]" class="page-link">[[%pdopage_first]]</a></li>',
'tplPageLast' =>'@INLINE <li class="page-item control"><a href="[[+href]]" class="page-link">[[%pdopage_last]]</a></li>',
'tplPagePrev' =>'@INLINE <li class="page-item control"><a href="[[+href]]" class="page-link">«</a></li>',
'tplPageNext' =>'@INLINE <li class="page-item control"><a href="[[+href]]" class="page-link">»</a></li>',
'tplPageSkip' =>'@INLINE <li class="page-item disabled"><span class="page-link">...</span></li>',
'tplPageFirstEmpty' =>'@INLINE <li class="page-item control"><span class="page-link">[[%pdopage_first]]</span></li>',
'tplPageLastEmpty' =>'@INLINE <li class="page-item control"><span class="page-link">[[%pdopage_last]]</span></li>',
'tplPagePrevEmpty' =>'@INLINE ',
'tplPageNextEmpty' =>'@INLINE ',
'tpl' =>'tpl.project'
])}
{if $id|resource:'class_key'=='modSymLink'}
{set $id = $id|resource:'content'}
{set $res = [
'gallery'=>$id|resource:'array_gallery',
'img'=>$id|resource:'tv_img',
'pagetitle'=>$id|resource:'pagetitle',
'longtitle'=>$id|resource:'longtitle',
'url'=>$id|url,
'parent'=>$id|resource:'parent',
'tv_price'=>$id|resource:'tv_price',
'tv_square'=>$id|resource:'tv_square',
'tv_floor'=>$id|resource:'tv_floor',
'tv_rooms'=>$id|resource:'tv_rooms'
]}
{else}
{set $res = [
'gallery'=>$array_gallery,
'img'=>$tv_img,
'pagetitle'=>$pagetitle,
'url'=>$id|url,
'parent'=>$parent,
'tv_price'=>$tv_price,
'tv_square'=>$tv_square,
'tv_floor'=>$tv_floor,
'tv_rooms'=>$tv_rooms
]}
{/if}
{set $gallery = json_decode($res.gallery,true)}
{if $gallery[0].image! && $gallery[0].image? && $gallery[0].published}
{if $.php.file_exists('uploads/gallery/'~$id~'/'~$gallery[0].image)}
{set $img = 'uploads/gallery/'~$id~'/'~$gallery[0].image}
{else}
{set $img = $res.img?:''}
{/if}
{else}
{set $img = $res.img?:''}
{/if}
cd C:/
sass -s compressed scss/style.scss:css_1/style.min.css scss/style.scss:css_2/style.min.css
Ext.onReady(function() {
MODx.load({
xtype: 'combo'
,width:400
,transform: 'block-1'
,id: 'block-1'
,triggerAction: 'all'
,editable: false
,forceSelection: false
,listeners: {'select': {fn:MODx.fireResourceFormChange, scope:this}}
});
});
<?
use Bitrix\Main\Localization\Loc;
use Bitrix\Main\Config\Option;
ignore_user_abort(true);
set_time_limit(0);
ini_set('display_errors', 0);
register_shutdown_function(function() {
$error = error_get_last();
if($error and $error['type'] == 1) {
http_response_code(200);
$result = array();
$result['error'] = $error['message'];
echo json_encode($result);
exit;
}
});
define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_FILE_PERMISSIONS", true);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
<?
$PERM["include"]["*"]="D";
$PERM["include"]["7"]="X";
$PERM["include"]["8"]="X";
$(document).ready(function() {
function compare_height(id) {
$(id+' [data-row]').each(function(){
var column = 0;
var attr = $(this).data('row');
$(id+' [data-row="'+attr+'"]').each(function(){
h = $(this).find(".js-compare-height").height();
if (h > column) {
column = h;
}
console.log(column);
}).height(column);
});
}
$(window).on('load resize', function() {
compare_height("#bx_catalog_compare_block");
});
});
$(function(){
var column = 0;
$('.swiper-slide .swiper-slide-item-1').each(function(){
h = $(this).height();
if (h > column) {
column = h;
}
}).height(column);
});