I ended up wasting too much time today trying to add a feature to a CMS I wrote a few years ago.

See, between the code, the templates, and the database, it passes an id to keep track of each piece of content. I had to add the ability to write out static text files for a Flash application to read in. (What, Flash can’t read data from MySQL yet? On a sidenote, I actually thought about adding a feature like this years ago as a file cache that would use includes rather than dababase hits. I might still do that, but anyway, back to our story…) The application uses the id, but not the path, which is what I needed. My first attempt added about 10 lines of code, but didn’t work due to the path variable not being there. After much thinking about the code I’d need to write, I finally realized I didn’t have to write any more code than the 10 lines I already wrote! I just needed to add one line to a template file to pass the path data as a hidden variable.

I like to keep things simple, and use GETs and POSTs whenever possible rather than cookies and session variables which always seem to cause problems in the apps I’ve been given to work on in the past…

Anyway, that feature is done, and it’s on to the next one…

Comments are closed.

« | »

buy the button:

Buy The Button