Notes from my backyard prairie & garden

After such a rainy Spring, I’m scrambling trying to catch up with the considerable growth. As always, I don’t want to complain about any amount of rain but I don’t mind saying that there is a lot of work to do in my yard.

Many years, the view by this time of Summer is tinged with a fair amount of brown. This time things are quite green—there has been a good crop of cucumbers and tomatoes, and the backyard prairie has produced one wave of blooming wildflowers after another.

New to MODX?

Pages on a MODX site are called Resources, and are visible on the left-hand side of the manager in the Resources tab. Resources can be nested under other resources, making it easy to create a tree of resources. There are different types of resources for different use cases.

Building your website is done through a combination of Templates, Template Variables, Chunks, Snippets and Plugins. Collectively these are known as Elements, and can also be found in the left-hand side of the manager, in the Elements tab.

Templates contain the outer markup of any page. Each resource can only be assigned to a single template at a time. By adding Template Variables to a template, you can add custom fields for any resource using that particular template.

With Chunks you can share parts of the markup, such as a header, across different templates. Snippets are pieces of PHP that return dynamic content, such as summaries of other resources or the current date. With snippets, you will often use Chunks to mark up the pieces of content it returns, instead of mixing the PHP and HTML.

Finally, Plugins enable more advanced features by hooking into the extensive events system provided by MODX.

To learn more about MODX, be sure to check out the Getting Started section in the official documentation.

Extend MODX with Extras