Blog Home

Make Plugins Execute Based on TV Values

Enable or disable plugins based on the values of specific TVs

Getting TV Values from Another Context

Here's a trick for getting the TV values for a resource that's in another context

Using modTemplateVarResource with a Default Value

How to handle the modTemplateVarResource object when the value for a particular resource might be set to the default value of the TV.

Using fromArray() to Write Raw Values to the DB

How to write raw values to the database with the fromArray() method.

Using getValue() for Object Content

Retrieving the main content field of resources and elements the fast way with getValue().

Using getValue() with TVs

Retrieving TV values fast with getValue()

Using getValue() with Date Fields

Retrieving and handling resource date fields like editedon and createdon in code the fast way with getValue()

Using getValue() wth Boolean (Yes-No) Fields

Getting and interpreting MODX boolean (Yes/No) fields in code

Get a Field Value -- Fast

A very fast and efficient method for getting field values in MODX, from Jason Coward.

Get Child TV Values

Getting the TV values for children of the current resource in MODX.