July 2010 Archives
Postmark app + MODx
We’ve got a few projects on right now where email delivery is really important (ecommerce order confirmation etc). Postmark seems to check all the boxes for features, pricing is fair, and they have a nice API for us to be able to integrate it into our own ‘app’.
I’m about 25% through these basic ‘wireframes’ for the email control panel we’re intending to use in multiple MODx Revolution projects. The panel will be a third party component (3PC), initially integrated into a shopping cart package that we’re also working on.

Early days… but so far so good, it’s crazy how quick you can go with MODext =)

- Monday, 26 July 2010
- 0 comments
Proof that using extJs for the MODx manager was a great decision
I think this is an example where we’re *really* starting to see now the power of the new MODx manager together with extJs. I can’t wait to see what else people start to come up with as more start learning MODext.
RT @splittingred: Updated Gallery 1.0 for #modx #revo - now adds custom TV with resizing/rotating/crop/more : http://bit.ly/8ZyHWD
Some vids of this in action:
http://assets.modxcms.com/videos/gallery-crop2.mov
http://assets.modxcms.com/videos/gal-resize.mov
I almost didn’t notice that the ‘Gallery Browser’ is not in fact the MODx Browser… but something much more streamlined for that specific TV. Looking forward to poking through Shaun’s code to see how he did that =)
- Saturday, 24 July 2010
- 0 comments
China Life Style Portal `Shi Wai Yuan` Launched using MODx Revolution
Today we’ve soft-launched a new site called ‘Shi Wai Yuan’ or ‘世外源’ in Chinese. Here’s a little intro, taken from the actual website:
Shi Wai Yuan is a luxury lifestyle website that focuses on Wine, Travel and Leisure, Luxury Goods, Health, Sports, Automobiles, Entertainment, Culture and Etiquette, Sustainability and being Green and Environmentally conscious, Cuisine and Culinary Arts, and Homes and Property. Education is one of the core elements of Shi Wai Yuan.
It’s aimed at the Chinese market primarily, and it has some interesting and unique content - I’ve enjoyed watching the tongue-in-cheek etiquette videos especially:
For a site like this we wouldn’t choose to build it in anything other than MODx Revolution.
Right now we’ve got 2 contexts setup for the site, one for each language. But we’ll be adding a third when we launch an ecommerce section of this site in a month or two.

Having launched a handful of sites making use of contexts, I have to say I think it’s my favorite addition to MODx and I think it extends its’ capabilities exponentially.
In case it’s of interest, here’s a list of the snippets we used to develop this site, accompanied by some of our own custom snippets of course:
The site is built in two languages, English & Chinese. We’ve done quite a few multi-lingual sites recently, but this one has by far been the most smoothly and efficiently executed now that we have learned from our past experiences with translation management.
One of the rules we will be sticking to is quite a simple one: as a developer, you are not allowed to close a file in your IDE if even one measly bit of hard coded text is left in there… chances are, you’ll forget about it and hunting down loose hard coded language strings is not a fun job for anyone.
I’m also really impressed at how fast this whole system is running - without any specific extra work other than using the MODx caching system, the pages are rendering in around ~0.1 seconds - and that’s before we’ve even had time to do any heavy optimization work or tried out any of the advanced caching abilities (e.g. memcache).
- Thursday, 15 July 2010
- 1 comments
Custom backgrounds on Shi Wai Yuan
One of the cool design elements of Shi Wai Yuan is the dynamically changing mood-setting background of the site. At this point the site has 6 different backgrounds (grapes, wood, leaves, sky, steel & carbon fibre), each supposed to be somewhat relevant to the section of the site being viewed; so you’ll find the background of the site is grapes when you’re viewing the wine and spirits section of the site, and greenery when you’re browsing the health section.

This is actually pretty easy to do - we’re just applying different classes to the <body> tag of the site, so that different background graphics can be loaded via CSS.
body.leaf {
background:url(“../images/background_leaf.jpg”) repeat scroll 00 #EFEFEF;\
}
^ This loads the site with leaves in the background.
body.sky {
background:url(“../images/background_sky.jpg”) repeat scroll 00 #EFEFEF;
}
^ This loads the site with clouds in the background
So the CSS is very simple, we just need to be able to define which class the page should load with, depending on the section of the site we’re in. This is also really simple using MODx Revolution, you can create a Template Variable for every template, set the type as ‘image’ so that your content editors can select images from the resource browser and you can then define your <body> tag in your templates as so:
For obvious reasons, you don’t want to have to do this to EVERY page on your site, that would be a painful chore (and your editors might forget)… So, there’s a few options, the simplest would be to use a default value for the template variable. For our needs we opted to use @INHERIT for the default value of the TV, meaning that we can define the image just once at the top level and all sub pages will inherit it’s parents’ field value (and so on up the tree). This means that by default, if we only set the field for pages at the root level of the site, then all pages beneath root level will have the same background as it’s ‘ultimate parent’.

(Evo is also capable of this in the same manner described above, but you should be using Revo by now =P)
The best part about this is the flexibility - it gives you the power to set a different background at the page level if you need to, but also allows you to change the background of an entire section by just setting one field (for those of us who are lazy).
More info on @INHERIT in these two links:
- Thursday, 15 July 2010
- 0 comments
