Hello,

I recently developed a gallery which a client wants to integrate with his drupal install. My question is if it's possible to pull the drupal header and footer to a page outside of drupal.

My gallery uses smarty, which means I can run php code inside the templates. I've reviewed the writing a module tutorial and various handbook pages about templating/theming drupal.

It seems to be a bit complex and I have never developed a module or theme for drupal so far. I'd like to go the "easy" way for now and pull the current layout (includes nav) and display my gallery where the regular page content is displayed. Is that possible at all?

Thanks for your help,
Till

Comments

nevets’s picture

This is a simple approach which may or may not work (I personally would recommend "drupalizing" your gallery).
Create a page, in the body place php code to invoke your gallery. Make sure the input filter is 'PHP code'. Submit and see what happens.

till’s picture

Thans for the reply!

The only problem seems to be that my gallery expects certain page parameters and right now "loses" the "drupal page" parameters. But I guess I could add those parameters, so it picks up the "drupal page" first and then uses my code to deliver content.

I noticed a drupal_page_footer(); but when I invoked it outside of drupal (included the bootstrap-part and so on), it did not output anything. Any hints and pointers?