I'd like to render the contents of a "basic page" in drupal. Something like this question: displaying a Drupal view without a page template around it but for Drupal 7.
My attempt almost works:
function mytheme_preprocess_page(&$variables, $hook) {
if ( isset($_GET['ajax']) && $_GET['ajax'] == 1 ) {
$variables['theme_hook_suggestions'][] = 'page__ajax';
}
}
And have a file named page--ajax.tpl.php
in the same directory where template.php lives:
<?php print $page['content']; ?>
The problem is that it still renders the menu and my two custom blocks from the sidebar. I only want the page content. What should I change?