Skip to main content

Hacking CMS output with Javascript

By Simon Willison



Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

In Fixing CMS usability issues with Javascript, Nathan Ashby-Kuhlman shares some of the tricks he has been using to get around the restrictions introduced by the content management system used to power his employer’s site.

This is an interesting use of Javascript. Each of the enhancements Nathan has made (such as dynamically allocating a better title to a page containing a news story) would be far better handled by server-side code, but without total control over the HTML produced by the system Javascript provides a useful workaround. Nathan himself has this to say on the subject:

For the record, I hate it when sites depend on JavaScript to display content. But since I can’t control some of the CMS’s HTML directly, JavaScript is really the only tool I have to make these usability improvements. I’d rather some of my site’s visitors have a more usable site, even if I can’t improve it for everyone.

By the way, thanks for all the feedback concerning topics you’d like to see covered here. I’ll be posting more about CSS and layout techniques this week.

New books out now!

Learn valuable skills with a practical introduction to Python programming!

Give yourself more options and write higher quality CSS with CSS Optimization Basics.