Kevin Pirnie' Articles

I found myself needing a really simple way to pull in my sites menu, but also wanted the ability to have some placeholders for the links as well.  The following code should be created as a snippet, and called un-cached [[!YOUR_SNIPPET_NAME]] What's it do? Well, simply put it generates a navigation block, and throws all your ModX site page links into a hierarchal un-ordered list of link items.  As well, as generates a bunch of dynamic placeholders in case you have a need for them.  Note:  the snippet needs to be called, prior to placing any placeholders in your content. How Do I Use This? Create your template or page and place the following snippet call (make sure to replace YOUR_SNIPPET_NAME, with whatever you named… Read More
Since I am currently running into this issue right now as I type this, I though I would share my experiences with moving a ModX Revolution site from one server to another.  It is not an easy task, but can be accomplished rather easily. The first thing you will need to do is to verify that your new server has PHP and MySQL installed, along with the PDO drivers. Next step is to search through your current database and change any physical paths it may contain to point to your new directory structure on the new server.  Once you have this done you are ready to do a mysqldump, if you have access to phpMyAdmin, take the easy route and simply do an export.  Make… Read More
I have become quite the ModX lover lately, I use it to run my site, as well as a great number of client websites and find that it is extremely speedy, easy to use (from my perspective), and easy to teach. There are a few things I don't like about it, but this post is not about that (well... at least not all of them :)).  This post is about SEO and URL Friendliness. Now ModX has a great built-in way to allow us to have friendly URLs for our content resources, however, by default all HTML content pages are given the .html extension.  While this normally is not a big deal, I am a bit of a stickler when it comes to my URL's.… Read More
This is a neat and tidy way to have multiple TLDs for one installation of MODx. Within MODx Go to System > Contexts and Create New for each domain. Name each one using camelCase (e.g. websiteOne) as you can't use spaces here. This name will be seen in the site tree within the Manager and you will also refer to it later on. Once finished refresh the manager and they will appear down the left. Right click each one and then Quick Create > Document Here to make a home page. Add a small piece of text on each of the pages so when you test you know it's reaching the right destination. Now add content settings by clicking on each heading and add the following: site_start –… Read More
Hey folks time for another quick article to get your ModX site running tip-top.    This one will allow you to 'prefetch' your sites pages for a faster browsing experience.   Now ModX has a pretty fantastic caching mechanism already built in, but I find that if your site has a lot of pages, sometimes that can take a bit on the initial load.This will take care of that issue.First and fore-most you will need to make sure to include the latest jQuery library in your templates.  This can be found at: jquery.comNext you will need to create a php file inside your 'wp-content' folder.   I usually create a few default folders inside this... one happens to be called 'php'Once you have the file… Read More