Sunday 28 July 2013

Week 6

For the sixth week of coding, I worked on the Full Page with Preview version of the UI Options. The Full Page with Preview version requires an iframe where users can preview the changes that they make to the website inside this iframe. I had to figure out a way to convert a Drupal php page into an html file and pass that to the Infusion settings to use inside the iframe. This blog post by Nick Lewis on how to convert a Drupal site to straight HTML was very useful. I've learned of a handy little Drupal function called drupal_http_request() from his blog post which allows you to perform an http request. From there, I just had to save it as an html file using another Drupal function.

There are still some stuff that needs to be resolved with the Fat Panel UI Options namely the custom template that I need to include with the module. I've figured out the best way to provide this and it is by using hook_menu() to register a separate page printing it out and just using drupal_exit() so that it doesn't get rendered with any theme and also the rest of the page like the sidebars and other regions won't be included.

No comments:

Post a Comment