diff options
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 0473b1b65..3f2922a00 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -2141,7 +2141,7 @@ function node_page_default() { ->addTag('node_access'); $nids = $select->execute()->fetchCol(); - + if (!empty($nids)) { $nodes = node_load_multiple($nids); $build = node_build_multiple($nodes); @@ -2152,24 +2152,27 @@ function node_page_default() { '#markup' => theme('pager', NULL), '#weight' => 5, ); + drupal_set_title(''); } else { - $default_message = '<h1 class="title">' . t('Welcome to your new Drupal website!') . '</h1>'; - $default_message .= '<p>' . t('Please follow these steps to set up and start using your website:') . '</p>'; - $default_message .= '<ol>'; - $default_message .= '<li>' . t('<strong>Configure your website</strong> Once logged in, visit the <a href="@admin">administration section</a>, where you can <a href="@config">customize and configure</a> all aspects of your website.', array('@admin' => url('admin'), '@config' => url('admin/settings'))) . '</li>'; - $default_message .= '<li>' . t('<strong>Enable additional functionality</strong> Next, visit the <a href="@modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="@download_modules">Drupal modules download section</a>.', array('@modules' => url('admin/build/modules'), '@download_modules' => 'http://drupal.org/project/modules')) . '</li>'; - $default_message .= '<li>' . t('<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href="@themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="@download_themes">Drupal themes download section</a>.', array('@themes' => url('admin/build/themes'), '@download_themes' => 'http://drupal.org/project/themes')) . '</li>'; - $default_message .= '<li>' . t('<strong>Start posting content</strong> Finally, you can <a href="@content">add new content</a> for your website. This message will disappear once you have promoted a post to the front page.', array('@content' => url('node/add'))) . '</li>'; - $default_message .= '</ol>'; - $default_message .= '<p>' . t('For more information, please refer to the <a href="@help">help section</a>, or the <a href="@handbook">online Drupal handbooks</a>. You may also post at the <a href="@forum">Drupal forum</a>, or view the wide range of <a href="@support">other support options</a> available.', array('@help' => url('admin/help'), '@handbook' => 'http://drupal.org/handbooks', '@forum' => 'http://drupal.org/forum', '@support' => 'http://drupal.org/support')) . '</p>'; + drupal_set_title(t('Welcome to @site-name', array('@site-name' => variable_get('site_name', 'Drupal')))); + + $default_message = '<p>' . t('No front page content has been created yet.') . '</p>'; + + if (user_access('access administration pages')) { + $default_links = array ( + l(t('Create content'), 'node/add'), + l(t('Change the default front page'), 'admin/settings/site-information'), + ); + $default_message .= theme('item_list', $default_links); + } + $build['default_message'] = array( '#markup' => $default_message, '#prefix' => '<div id="first-time">', '#suffix' => '</div>', ); } - drupal_set_title(''); return $build; } |