1

I am attempting to render an entire page through an ajax callback using either custom javascript or drupals ajax_deliver. The issue is that it is trying to render the entire page and I simply want it to render what is in a custom page.tpl.php file created. I have found a solution around this using a $_GET in the html.tpl.php but it seems hacky to me.

Basically I am rendering only the $page variable if a $_GET is set, if not render it as normal. Is there any functions or way to simply render all the regions in a page, minus what is in the html.tpl.php

1 Answer 1

0

There is AJAXify Pages (dev version only)

Module to ajaxify site browsing and navigation. For instance, it allows for continuous audio playback via Background Audio module while changing the content of the pages.

or AJAXify module (D5 only)

You can always create links that load other pages via AJAX but you will still load a full page HTML while you may only need a single HTML element from the loaded page and this is what AJAXify focuses on.

If youre not planning to use any of these module take a look at THIS function to get some idea.

1
  • Thanks those seem so be helpful. I also found another way which basically hooks into the theme preprocess html/page and if i have an argument through the get then it will return a different html.tpl.php and different page.tpl.php page, which seems a little hacky to me so that would be last resort. Thanks for the help! Commented Mar 7, 2013 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.