Category Archives: MODX

MODX getOption() with Snippet Properties

In the previous article, we looked at the various ways that $modx->getOption() can be used. In this one, we’ll look specifically at how it handles snippet properties placed in a …

Tags: , , , , , , | Posted under MODX, MODX | Leave a comment

Understanding the MODX getOption() Method

The $modx->getOption() method is the workhorse of MODX snippet code. There are over 1300 instances of it in my core/components/ directory. It’s used in almost any non-trivial snippet and many …

Tags: , , , , , , , , | Posted under MODX, MODX | Leave a comment

Displaying the Age of a Resource in MODX

You might sometime have a need to display the age of a resource. The MODX Forums, for example, show how long ago a post was entered in Years, months, weeks, …

Tags: , , , , , , , | Posted under MODX, MODX | Leave a comment