0

I simply removed the $content variable from the tpl.php file and placed only some blocks in several regions. Then the blocks are displayed fine but the message "Page not found" appears. So I suppose this is not the right way to achieve this.I know that for example Views and Panel can make pages with paths defined by their own without node content. But can I still have a page which has its own path and with only blocks but no node content without using Views or Panel?

4

You can use the the Empty Page module to allow you to have pages solely for placing blocks.

The Empty Page module is a simple empty page solution. It provides an interface that assists in managing "empty" menu callbacks, mostly used for pages that only consist of blocks.

  • damn...you got there just before me :-) – Chapabu Dec 19 '11 at 16:50
0

You can create a page.tpl.php to handle your page. The documentation at Drupal.org is older but can get you started. There are also a lot of good books that can bring you up to date on writing templates. Remember that the 'print' statements used in tpl.php files have been replaced by 'render' in D7.

The question that interests me is why do you want to do this without using established and flexible modules? If you are looking to modify their results, both views and panels have hooks to allow you to do so.

  • The reason why I don't want to use modules like Views and Panes is that I just simply want to have a page with blocks but don't need to pull out some data or change the layout. – chinita7 Dec 20 '11 at 2:40
0

Empty Page is a good choice, but if it's too simple for your use-case then have a look at Panels + CTools + Page Manager (sub-module of CTools).

Heavier-weight than Empty Page, but they can do what you need and much more -- handy if you need variants of a page for different user types, themes etc, or you want more control over appearance, caching and other more advanced stuff.

  • Thanks I'll go with Empty Page module. Panels sounds very handy but I think it's a bit too heavy as you say for my use this time as I don't need to change the layout and just want to have a simple page with only blocks all the user can access. – chinita7 Dec 20 '11 at 2:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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