Skip to content

Instantly share code, notes, and snippets.

View ASDAFF's full-sized avatar
🏠
Working from home

ASDAFF ASDAFF

🏠
Working from home
View GitHub Profile
@ASDAFF
ASDAFF / Пример чанка tplCatItem
Last active April 4, 2017 17:56
Пример чанка tplCatItem
<div class="ajax-item">
<img src="[[+tv.image]]" alt="[[+pagetitle]]">
<h4>[[+pagetitle]]</h4>
<table>
<tr>
<td>Этаж</td>
<td>[[+tv.floor]]</td>
</tr>
[[+tv.area:isnot=``:then=`
<tr>
@ASDAFF
ASDAFF / сниппет catalogFilter
Last active June 3, 2019 21:10
сниппет catalogFilter
[[!catalogFilter?
&tpl=`tplCatItem`
&limit=`3`
&parents=`5`
&fields=`image,area,floor,garage,price`]]
@ASDAFF
ASDAFF / Пример вывода радиокнопок во фронтенд
Last active April 4, 2017 17:58
Пример вывода радиокнопок во фронтенд
<input name="floor" value="0" checked="" type="radio">
<input name="floor" value="1" type="radio">
<input name="floor" value="2" type="radio">
<input name="floor" value="3" type="radio">
@ASDAFF
ASDAFF / MODx catalogFilter
Last active April 4, 2017 17:59
MODx catalogFilter
<?php
//Filter Fields Settings
$filter = array();
//Radio, Select & Text Fields Type
if($_GET['floor']) {
$filter[] = 'floor='.$_GET['floor'];
}
//Two Text Fields From To
@ASDAFF
ASDAFF / MODx pdoResources Ajax Filter
Last active April 4, 2017 17:59
MODx pdoResources Ajax Filter
$(function() {
//MODx pdoResources Ajax Filter
//Filter Settings
var fadeSpeed = 200, // Fade Animation Speed
ajaxCountSelector = '.ajax-count', // CSS Selector of Items Counter
ajaxContainerSelector = '.ajax-container', // CSS Selector of Ajax Container
ajaxItemSelector = '.ajax-item', // CSS Selector of Ajax Item
ajaxFormSelector = '.ajax-form', // CSS Selector of Ajax Filter Form
ajaxFormButtonStart = '.ajax-start', // CSS Selector of Button Start Filtering
[[Wayfinder? &startId=`[*parent*]`]]
[[Wayfinder?startId=`6`]]
[[Wayfinder?startId=`0`]]
@ASDAFF
ASDAFF / favicon_MODx.html
Last active March 7, 2016 14:29
favicon.ico MODx
<link rel="shortcut icon" href="[(site_url)]/favicon.ico"/>
@ASDAFF
ASDAFF / how to use
Last active January 5, 2016 17:12 — forked from coonica/how to use
MODX Revo snippet to divide resources into columns.
Call the snippet
[[multiCols?
&cols=`2`
&tvs=`{"image":1}`
&select=`pagetitle,introtext`
&where=`{"published":1, "deleted":0, "parent":2}`
&sortby=`publishedon`
&sortdir=`DESC`
&tpl=`tpl_article`