1
votes

I've got a custom page I created programmatically using hook_menu. I can have it return content without a problem. However, I want it to appear within the content region of my page.tpl.php template so that blocks can be incorporated in the page. Same way that Views allows you to give a view a custom url while still appearing in the page.tpl.php template.

How do I do this for my page? By default, I just get a with only my content.

Thanks, Howie

1
Can you paste the code you used to create your page ? - Haza

1 Answers

2
votes

In your page callback function, if you just print the content of your page without returning anything, it won't be included within your page.tpl.php. If you return a string containing the contents of your page, it will go into the content region, i.e.

function mymodule_page_callback () {
   $content = "Hello, world inside the content region";
   return $content;
}