Hello,
I recently installed Evolution 1.0.2.
I have a website that is ready to be launched. I decided to try integrating the website into MODx. The website includes XHTML, CSS, JavaScript, and PHP. Once launched, I am implementing a second phase of the project: providing the client with content management functionality; hence my desire to use MODx.
I have spent a few hours learning how to create templates and resources, and the static portion of the website is done.
I am now in the process of integrating the PHP code, specifically for a contact form. This is where my first general question arises - is it necessary to re-do all of the PHP code as snippets, or is there a way to re-use the PHP from the website as-is? I believe this is complicated by the fact I use session variables to remember values entered by the user, so a reload of the contact form doesn't wipe out their data. In other words, the best way to access session variables is to ensure all PHP code is run in snippets, correct?
If everything should be converted to snippets, how should the validation code (the code run when the form data is posted) be re-worked? Is the format suggested by Breezer in this thread
http://modxcms.com/forums/index.php?topic=27000.0 the way to go?
I seem to be at a point of no return: either keep spending time re-writing the website for MODx, or abandon this approach and write my own content management for the client. It is involving more of a re-write to integrate this website than I first thought it would be, and am wondering if I am doing something wrong.
Thanks,
Ben