Remove the "No front page content has been created yet." in the default Drupal installation

* Implements template_preprocess_page().
function YOUR_THEME_preprocess_page(&$vars) {
  // Remove the "No front page content has been created yet.".
  if (isset($vars['page']['content']['system_main']['default_message'])) {

8 comments for 'Remove the "No front page content has been created yet." in the default Drupal installation'

alexanderpas's picture

A better solution would be to show how the /node page itself is disabled, and how to change the default front page.

admin's picture

Alternative way is to use Empty Front Page module. But this completely removes the homepage content.

The code I posted above is used when you have other blocks that are also in the $page['content'] region, but you do not wanna show the default "No frontpage content..."

Rob's picture

Couple alternatives to this;
You could create a node, and in your settings, set that Node ID as your Front page.
Or, you could create a View Page, and set that as the Front Page.

admin's picture

Yeap! Thanks for the alternatives too! Definitely many ways to do this, such as using Panels to create a Panels Page homepage placeholder.

app development in sydney's picture

In Home, then Administration, then Configuration, then System, then Site information, you can specify the "Default front page". I specified a node (an alias), and my front page became that content. Leaving this blank dumps the content feed.

hmevsoche's picture

We went Linhaixueyuan , and then the cold temperature can not reduce our interlocking fingers warm, then cold wind blew across each other, we do not smile.

Add new comment