Skip to content

Instantly share code, notes, and snippets.

Wayne Roddy dubrod

  • MODX
  • Inverness, FL
Block or report user

Report or block dubrod

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dubrod / MODX ID to JSON
Last active Jan 23, 2019
$id = $_GET["id"];
if(empty($id)){ die(); }
$obj = $modx->getObject('modResource', $id);
$output = [];
dubrod / Commonly Used MODX Head Tags
Last active Jan 7, 2019
Commonly Used MODX Head Tags for use in my Public Snapshots
View Commonly Used MODX Head Tags
<meta name="description" content="[[*description]]">
<meta name="keywords" content="[[*keywords]]">
<meta itemprop="url" content="[[~[[*id? &scheme=`full`]]]]">
<meta itemprop="name headline" content="[[*pagetitle]]">
<meta itemprop="description" content="[[*description]]">
<meta itemprop="image" content="">
<!-- Twitter -->
dubrod / 2013 Adaptive CSS Containers
Last active Dec 15, 2018
2013 Adaptive CSS Containers Snippet. From 1600+ to Mobile. This snippet will keep a nice margin on the sides of your container for browser size most used in 2012. It's not a Responsive Snippet, that would be using %.
View 2013 Adaptive CSS Containers
/*~~~~ CONTAINERS December 2013 - ~~~~*/
/* 1600x900 4.09% */
margin: 0 auto;
width:1410px; /* 3 Columns would be 470px */
/* 1440x900 5.26% */
@media (max-width: 1440px){ .container{width: 1230px; /* 3 Columns would be 410px */ } }
dubrod / modx-up-title
Created Nov 30, 2018
simple ultimate parent title
View modx-up-title
//4 levels deep
$title = '';
//first level parent
$parentId = $modx->resource->get('parent');
if($parentId == 0){
$title = $modx->parseChunk('interior-title', array('title' => $modx->resource->get('pagetitle') ));
return $title;
View modx-tagger-notes
Group 1 = Category | Combo Box
Group 2 = Keywords | Tag field
Category Template
Snippet = [[cateName]]
$get = modX::sanitize($_GET, $modx->sanitizePatterns);
$tag = ucfirst(urldecode($get['categories']));
$tag = str_replace("-"," ", $tag);
View modx-snippet-notes
$resources = $modx->getCollection('modResource', array('published'=>'1','hidemenu'=>'0','isfolder'=>'1','parent'=>'16','class_key'=>'modDocument'));
foreach($resources as $resource) {
$id = $resource->get('id');
$thumb = $resource->getTVValue('thumbImage');
View modx-mail-notes
/* modx mail service */
$modx->getService('mail', 'mail.modPHPMailer');
$modx->mail->set(modMail::MAIL_FROM_NAME,'Quick Quote');
$modx->mail->set(modMail::MAIL_SUBJECT,'Lease Quote #'.$id.'');
dubrod / modx-siblingnav
Last active Nov 30, 2018
Simpler MODX Sibling Nav for all children with just previous and next output
View modx-siblingnav
[[!siblingNav? &parents=`4` &limit=`4` &sortBy=`{"publishedon":"DESC"}` &prevTpl=`mxt.prevTpl` &nextTpl=`mxt.nextTpl`]]
<ul class="clearfix">[[+sn.prev]][[-+sn.prevlinks]][[-+sn.nextlinks]][[]]</ul>
<li>[[+_isactive:is=`1`:then=`<a href="[[~[[+id]]]]">&laquo; [[+pagetitle]]</a>`:else=` &laquo; `]]</li>
View modx-archivist-notes
Friendly URL container_suffix must = /
System Setting:
Key: archivist.archive_ids
name empty
namespace: archivist
area lexicon: furls
value: 18:arc_ (18 being resource id)
Archive Template ( needs to be container )
dubrod / modx-form-snips
Created Nov 30, 2018
collection of modx form snips
View modx-form-snips,-checkboxes-and-radios
You can’t perform that action at this time.