Instantly share code, notes, and snippets.

View mdx_ajax
<?php
/*$page = $modx->getObject('modResource', 13);
$chars = json_decode($page->getTVValue('chars'));
echo '<pre>';
foreach($chars as $k => $v)
{
echo $v->key0.'-'.$v->value0;
}
View gist:f2155feaca8591fedabac58f52280ceb
$where = array(
'parent' => 6
);
$resources = $modx->getCollection('modResource',$where);
$output = '<p>Всего ресурсов: '.count($resources).'</p>';
foreach ($resources as $k => $res) {
$output .= '<p>['.$k.'] => '.$res->get('pagetitle').'</p>';
}
print $output;
View Gruntfile.js
module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
pug:
{
compile: {
options: {
View package.json
{
"name": "ct.fzn.by-jqm",
"version": "0.0.1",
"devDependencies": {
"grunt": "latest",
"grunt-browser-sync": "latest",
"grunt-contrib-concat": "latest",
"grunt-contrib-pug": "latest",
"grunt-contrib-watch": "latest",
"grunt-critical": "latest",