MODx Evolution: Creating a Simple Custom Snippet Part 4 – Optimize with Caching

Part 0: Introduction
Part 1: Write and Test the PHP Script
Part 2: Create the Snippet
Part 3 – MODx API, Placeholders, Chunks

In the fourth part of this brief series on creating a custom MODx Evolution snippet, we’re going to do some optimizing to make our snippet a little more efficient.  So far the snippet seems to be working as expected and is pulling in the feeds as needed.  However, it’s a little inefficient.  The way things are set up now, every time someone refreshes the page, the script fetches a new copy of the rss feed from the coding pad, or whatever source you’re pulling your feeds from. If you have a heavily trafficked site where people spend a lot of time on your site and visit many pages (thus, for example, constantly refreshing your snippet call in the sidebar), this can be resource heavy on both your side slowing your website down, and also on the web server that you’re pulling the feeds from.  We can mitigate this by implementing caching.

Continue reading “MODx Evolution: Creating a Simple Custom Snippet Part 4 – Optimize with Caching”

Want to Take MODx (Evolution or Revolution) for a Test Run?

trymodx

If you want to take MODx Revolution beta (or any other MODx release) for a test run without going through the install process for yourself, you can do so at MODx Demo, a website that lets you try out both the front end and the back end to get a feel for it.

Those of you who’ve been following my MODx tutorials already have a nice feel for Evolution but you may not have ventured into the world of MODx Revolution yet, so this is a great way to see what it looks like and get a feel for the changes.

Make sure you take a glance at the Demo limitations so you know what to expect.

Enjoy!

UPDATE: Looks like the demo has been removed from the site.  If I find another one or it gets restored I will post an update here.  If you guys know of any revo demos that people can play with let me know in the comments.

Building a Website with MODx for Newbies- Part 10: Adding Search Functionality Using ajaxSearch

Welcome to part 10 of our series of tutorials on building a website with MODx CMS. So far we’ve looked at:

Part 1: Introduction to MODx
Part 2: Installing MODx
Part 3: Working with Templates
Part 4: Introducing Chunks
Part 5: Introducing Snippets
Part 6: Introducing Template Variables
Part 7: Introducing Ditto
Part 8: More Ditto
Part 9: Adding a Contact Form with eForm

So far things are looking good on our Learn MODx website, and we’re adding more functionality and hopefully building our skills with each of these tutorials.  My hope is that by this point you’ve developed enough of an idea of the way MODx works that you’re moving on and exploring on your own, building and testing, and hopefully you know some things that I don’t about MODx and it’s workings 🙂  So far our website looks like this:

tut10modxcms1

One of the things I find myself looking for in every website I visit is a search box or link.  Whether the website is a massive knowledge portal such as Wikipedia, or a social networking site, a blog, or just a simple company website, having the ability to search the website and find the information I need without clicking through numerous links is very important to me. It then follows that I would like to add search functionality to the websites I build. This what we’re going to accomplish in this segment.

Continue reading “Building a Website with MODx for Newbies- Part 10: Adding Search Functionality Using ajaxSearch”

Building a Website with MODx for Newbies- Part 9: Adding a Contact Form Using eForm

Welcome to part 9 of our series of tutorials on building a website with MODx CMS. So far we’ve looked at:

Part 1: Introduction to MODx
Part 2: Installing MODx
Part 3: Working with Templates
Part 4: Introducing Chunks
Part 5: Introducing Snippets
Part 6: Introducing Template Variables
Part 7: Introducing Ditto
Part 8: More Ditto

As we work through these tutorials, we’re building a MODx resource site called Learn MODx. So far we have a pretty functional website and I hope that you’re picking up enough knowledge and interest along the way to experiment with MODx and add features and functionality to your website.

In this installment, we’re going to look at how to add a vital part of any website, the contact form, to our MODx website, using the eForm Snippet.

Continue reading “Building a Website with MODx for Newbies- Part 9: Adding a Contact Form Using eForm”

Building a Website with MODx for Newbies- Part 8: More Ditto

Welcome to part 8 of our series of tutorials on building a website with MODx CMS.  So far we’ve looked at:

Part 1: Introduction to MODx
Part 2: Installing MODx
Part 3: Working with Templates
Part 4: Introducing Chunks
Part 5: Introducing Snippets
Part 6: Introducing Template Variables
Part 7: Introducing Ditto

As we work through these tutorials, we’re building a MODx resource site called Learn MODx.  In the last installation we introduced Ditto and continued working on the Library section of our resource website.  In today’s installation we’re going to continue working some more with Ditto, and learn how to template our output so that our Library page has the look we want.  In the learn we will learn a little more about Ditto, its parameters, and its placeholders.

Continue reading “Building a Website with MODx for Newbies- Part 8: More Ditto”