From f6075d2d4c9d71a1ee2e48ad7a7a877f412dc761 Mon Sep 17 00:00:00 2001
From: Jacob Singh <jacobsingh@gmail.com>
Date: Sat, 28 Jan 2012 19:45:39 -0500
Subject: [PATCH] Issue #639966: Added an option to hide the page title for content on the front page

---
 core/modules/system/system.admin.inc |    6 ++++++
 core/modules/system/system.module    |    9 +++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index 4e8e936..19dbfe9 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -1471,6 +1471,12 @@ function system_site_information_settings() {
     '#description' => t('Optionally, specify a relative URL to display as the front page.  Leave blank to display the default content feed.'),
     '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),
   );
+  $form['front_page']['site_frontpage_hide_title'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Hide the page title on front page'),
+    '#default_value' => variable_get('site_frontpage_hide_title'),
+    '#description' => t('If checked, the page title will be hidden on the front page.'),
+  );
   $form['front_page']['default_nodes_main'] = array(
     '#type' => 'select', '#title' => t('Number of posts on front page'),
     '#default_value' => variable_get('default_nodes_main', 10),
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index c0467f0..5471f72 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2116,6 +2116,15 @@ function system_preprocess_block(&$variables) {
 }
 
 /**
+ * Implements hook_preprocess_page().
+ */
+function system_preprocess_page(&$variables) {
+  if (drupal_is_front_page() && variable_get('site_frontpage_hide_title') == TRUE) {
+    $variables['title'] = '';
+  }
+}
+
+/**
  * Provide a single block on the administration overview page.
  *
  * @param $item
-- 
1.7.2

