Quantcast
Browsing all 115 articles
Browse latest View live

[MODX] Get a Field Value – Fast!

Suppose you want the value of a single field from some MODX object (most often, a resource, user, or user profile). Let’s use the example of a resource. You know … Learn More

View Article


Using getValue() with Boolean Fields in MODX

In a previous article, we looked at a very fast and efficient xPDO method for getting the value of a single field from a MODX object using the getValue method … Learn More

View Article


Using getValue() with Date Fields in MODX

In a recent article, we looked at a very fast and efficient xPDO method for getting the value of a single field from a MODX object using the getValue method … Learn More

View Article

Using getValue() with TVs in MODX

In a previous article, we looked at a very fast and efficient xPDO method for getting the value of a single field from a MODX object using the getValue method … Learn More

View Article

Using getValue() to get Object Content

In previous articles, we looked at a very fast and efficient xPDO method for getting the value of a single field from a MODX object using the getValue method of … Learn More

View Article


Replacing an Existing MODX Site

It’s a common task to have to replace (not upgrade) an existing site with a MODX site. Maybe you’re converting an Evolution site to Revolution, or converting a WordPress site … Learn More

View Article

Why I Put All MODX Sites in Subdirectories

Some people prefer (and will advise you) to put MODX sites in the server’s web root (public_html) whenever possible. There’s nothing wrong with doing that, and it can save you … Learn More

View Article

[MODX] Git Bash Inside PhpStorm

If you don’t use Git and Jetbrains’ fabulous editor, PhpStorm, this article probably won’t interest you. Likewise, if you use both and are used to using the Git features inside … Learn More

View Article


MODX Git Fu

I use Git a lot. It has saved my bacon more times than I can count. I thought I’d write a little about how I have Git set up in … Learn More

View Article


Getting Multiple Parent Fields in MODX

In a previous article, I showed a way to display a particular field from the current resource’s parent. Sometimes, though, you might want to display information from several of the … Learn More

View Article

Using MySQL for MODX Queries

The xPDO methods built into MODX Revolution are tremendously convenient and intuitive once you get used to them. Sometimes, though, you want to bypass xPDO either for increased speed, or … Learn More

View Article

Getting Multiple Object Fields — FAST

In some previous articles, we discussed a fast way to get individual object fields in MODX Revolution with getValue(), but what if you need more than one field? In this … Learn More

View Article

Bypassing MODX to Write Directly to the Database

In some previous articles, we discussed fast ways to get data from the database in MODX Revolution, but what if you want to update the database? Suppose that you also … Learn More

View Article


Using fromArray() to Write Raw Values to the DB

In the previous article, we saw a way to write raw values to the MODX database with PDO. In this one, we’ll see a slightly slower, but much more convenient … Learn More

View Article

Using Parameterized Prepared Statements to Retrieve Data

In previous articles, we discussed using PDO to do fast writes to the database. If you’re going to write a bunch of objects to the database, though, it’s wasteful to … Learn More

View Article


Using Prepared Parameterized Statements in a Class

In the previous article, we discussed how to create a parameterized, prepared statement that can be reused in a loop so that prepare() only needs to be called once. But … Learn More

View Article

Dynamic Search Criteria for getResources

There are many cases where the search criteria you want to specify for getResources, pdoResources, or another extra that uses a &where property, require calculations or are too complex to … Learn More

View Article


Template Report

A MODX Forums user asked for a way to find out which of his many templates were actually in use. Here’s a snippet that will create a report giving the … Learn More

View Article

Template Report with Pagetitles

In the previous article, we looked at a snippet that shows the number of published and unpublished resources connected to each template. In this one, we’ll expand that to show … Learn More

View Article

Diagnosing MODX Revolution Permission Problems

When I first thought of the snippet below, I thought it was a brilliant idea. On further reflection, I have to confess that it’s a lot less useful than I … Learn More

View Article
Browsing all 115 articles
Browse latest View live