Pretentious title maybe, calling the menu builders for wonders, but if we can’t be pretentious to ourselves and the few how read what we write, then who can we be pretentious to?
Anyway, contrary to popular belief, yes the site is very popular and people have begun to believe great things about it, the menu builders do not use neither Flash nor Ajax or XHR or what ever it is called it now a days.
How do I know what people believe, you might ask, and I will tell you how, though you might already have figured it out. I read other peoples blogs, especially the ones that have posts about css menu builder. Some, of course, are in obscure languages that I have not yet mastered, but thanks to the wonderful Google Translate service, I am now able to get the big picture, so this is how I know.
But to get back to the point of this post, the mechanics are actually much simpler than using Flash, which by the way I suck at, or AjaXHR. I actually went with just changing the stylesheet everytime a setting in the menu builder is changed.
The earlier versions of the menu builders, which where never known to the world, used Ajax, but I didn’t feel it was clean enough, since it added styles inside the response. So when I started extracting the menu builders from my other projects, I remembered a stylesheet switcher script I had come across. The stylesheet switcher was written by Achim Mensching and though I changed a few things, all credits go to him for making my life so much easier and such a great little script. I had actually forgotten to write him in my Kudos section in the contact page and I apologize for this, if he should ever read this post.
The menu builders use javascript, in this case MooTools and code that I made for the site, the great MooRainbow as the color picker and the stylesheet switcher. Once the stylesheet is changed, it takes the variables passed to it and adds them to the background image, which is a PHP file that generates the images.
Ok, now that I am reading this it looks a little confusing and not that clear, but maybe that’s only because it is late, anyway I hope you get the picture.
So I hope, by explaining the simple mechanics, this can help others in getting ideas for new and cool (maybe even free) tools for the web.