Home » MODX®

MODX Posts

Aug 25, 2010

WordPress to MODx Migration Part 3
Templates, Categories, and Postmeta

Alright, I'm back for part three of this action packed WordPress to MODx Migration mania. In part one I showed you how to use xPDO to connect to the WordPress database and import post content into MODx. In part two I demonstrated how xPDO handles table relationships by importing WordPress comments into MODx. In this part of the WordPress to MODx migration I'm going to show you how to create and assign templates, migrate categories and postmeta data. Before we start, …

Jul 06, 2010

WordPress to MODx Migration Part 2
Schema Relationships and Comments

In part 1 of this Wordpress to MODx migration I introduced you to xPDO's schema and model generators and started work on migrating wordpress post and page data into MODx. In this post I'm going to show you how I built the relationships in the wordpress schema file and how I pulled in all of wordpress's comments and kept the threading in tact. Plus the script has evolved to handle where to store pages vs posts, what to do with versions, keeping child/parent relationship…

May 20, 2010

WordPress to MODx Migration Part 1
First Impressions of xPDO

I wrote in my last post that I want to move this blog from WordPress to MODx and so I thought this would be a good real world lesson in using xPDO.  Rather than custom coding a database migration tool using plain old php like I've done in the past, I thought it would be cool to see what xPDO could do, how easy it would be, and how robust xPDO is.  I've spent 2 hours on the code below and have never used xPDO before, and so far I'm pretty impressed with what xPDO can do. …

May 13, 2010

MODxpo 2010

I feel fortunate to have spent the last two days in Dallas, TX with the greatest minds in the MODx world. MODxpo 2010 was so far above what I expected that I'm at a loss to capture everything that went on. The most awesome and most humbling aspect of the conference was the openness, honesty, and down-to-earthness of all of people that attended, including the core team. As I've written before, the MODx community is a big reason why I've stuck with it for the past 3 yea…

Dec 31, 2009

Book Review
MODx Web Development from Packt Publishing

I want to be honest with you, I've kind of been putting off writing my review of MODx Web Development from Packt Publishing. I actually finished the book about a week ago and just felt like I had to give it some distance so I didn't totally bash this book. It's not really fair to the author to just outright say that this book isn't good because they put some thought into it and worked hard. But if I would have written this post a week ago, that's all you would have he…

Oct 22, 2009

MODx Chunk Cache Plugin

I needed to cache a chunk as a file so that another application (an ecommerce store) could include that file as well. I wrote this plugin that does that: $chunks = array('StoreMenu'); // array of chunks that need to be cached foreach($chunks as $v) { $res = $modx->db->select("snippet","modx_site_htmlsnippets","name = '$v'"); if($modx->db->getRecordCount($res)) { $output = $modx->db->getValue($res); $fh = fopen($modx->config['base_path'].$v.'.html','w'); …

Oct 13, 2009

New Tool
MODx Snippet Call2PHP

I added a new tool today for MODx users that turns a MODx snippet call into a snippet call using the MODx API function runSnippet(). It's a pretty simple tool, but I made it because I hate doing this manually (it's just too tedious). Enjoy. MODx Snippet Call2PHP

Oct 12, 2009

MODx Sucks

So I was looking at my Google Webmaster Tools this morning for devtrench.com and I throught it was pretty funny to see that this site ranks #1 for "modx sucks". Just for clarity I wanted to write this post to let everyone know that my opinion is that MODx doesn't suck, but that there are few sucky aspects of MODx. In fact, I would say that MODx is the best CMS out there when you consider how easy it is for regular people (non-geeks) to use. If you've never used MODx and …

Feb 28, 2008

Things that Suck About MODx CMS

This post started out titled Pros and Cons of MODx CMS, but today I'm rewriting it because I'm really not in the mood to give you a bunch of fluff about why MODx is great and then give you the bad stuff. Flat out, I think MODx is the best CMS for my projects at this point in time. Now on with things that suck... It says its a Framework, but I use it as a CMS If you have used frameworks in the past, MODx is not going to feel like a true framework. My personal fa…

Jan 28, 2008

How To Use a MODx Plugin to Cache Snippets

I don't want to take credit for this, but I definitely wanted to blog about it because I think it is a big deal. In a forum post I made on modxcms.com, ganeshXL came up with an awesome way to cache snippet output with a MODx plugin. Here is what ganeshXL wrote: create a chunk. Leave it empty. Name it whatever you want, e.g. testMenu create a plugin. Enter this: $myChunk = 'testMenu'; // your chunk name $params['startId'] = '0'; $params['level'] = '4'; $html = addslas…

Jan 11, 2008

Automation Tip
How To Auto Set Copyright Years*

Now that it's January 2008 some of my clients are noticing that the year in their copyright statements don't reflect 2008. Now, I always set this to drop in a dynamic value, but that wasn't the case before I was hired. This is such an easy thing to set up when you are developing a site so I suggest you do it right from the start. I use 3 main types of copyright year automation... Javascript