Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View MacConin's full-sized avatar

Mac Conin MacConin

View GitHub Profile
@MacConin
MacConin / bootstrap_output_in_rows
Last active August 29, 2015 14:16
Output of resources in rows something like outputting 4 resources: <row><resource><resource><resource></row> <row><resource></row>
<!-- outputting in rows -->
<div class="row">
[[pdoResources?
&parents=`[[*id]]`
&depth=`2`
&limit=`99`
&includeTVList=`myTv,anotherTv`
@MacConin
MacConin / pdoMenu test pattern
Created March 9, 2015 10:03
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.
<!-- Testpattern for pdoMenu -->
[[pdoMenu?
&parents = `0`
&level = `2`
&cache=`0`
&tplOuter = `@INLINE <ul[[+classes]]>
@MacConin
MacConin / new_gist_file_0
Last active August 29, 2015 14:16
Search & Replace in modx_site_content
## 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:
@MacConin
MacConin / introRTE
Last active August 29, 2015 14:13 — forked from christianseel/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>');