Skip to content

Instantly share code, notes, and snippets.

Avatar

Mac Conin MacConin

View GitHub Profile
@MacConin
MacConin / bootstrap_output_in_rows
Last active Aug 29, 2015
Output of resources in rows something like outputting 4 resources: <row><resource><resource><resource></row> <row><resource></row>
View bootstrap_output_in_rows
<!-- outputting in rows -->
<div class="row">
[[pdoResources?
&parents=`[[*id]]`
&depth=`2`
&limit=`99`
&includeTVList=`myTv,anotherTv`
@MacConin
MacConin / pdoMenu test pattern
Created Mar 9, 2015
pdoMenu test pattern Curious which templates needed for your modx menu? Just place this snippet call into your layout Replace placeholder (A-K and 1-10) with needed functions.
View pdoMenu test pattern
<!-- Testpattern for pdoMenu -->
[[pdoMenu?
&parents = `0`
&level = `2`
&cache=`0`
&tplOuter = `@INLINE <ul[[+classes]]>
@MacConin
MacConin / new_gist_file_0
Last active Aug 29, 2015
Search & Replace in modx_site_content
View new_gist_file_0
## searches for 'old'
## and replaces it with 'new'
## in field 'content'
## restricted to context 'web' (which is optionally)
## always make a backup
## there is NO undo !
## optionally
## check if there is a match:
View introRTE
<?php
// Add RTE for introtext if richtext option is enabled for the resource
// check "OnDocFormRender" event
$modx->regClientStartupHTMLBlock('<script>Ext.onReady(function() {
if(MODx.loadRTE) MODx.loadRTE("modx-resource-introtext");
});</script>');