As you know "Site information" of drupal core contanins following fields:
Name, E-mail address, Slogan, Mission, Footer message, Anonymous user, Default front page
I want to create a custom "Site information" page that doesn't show the last two fields(Anonymous user
and Default front page ) to my customes.
shall I write a custom module to do it? or is there a better way?

Comments

Yas375’s picture

subscribing for this question

vm’s picture

May have to investigate using a custom module where the moduel implements a hook_form_alter
more information on hook_form_alter over at api.drupal.org

WorldFallz’s picture

yep-- just create a little custom module and unset those form fields. Probably not even 6 lines of code. I add a custom.module module to every site just for these types of little tweaks.

deanloh’s picture

Hello Adolph, not sure if you have found the solution. I happened to need this done too. So I created a custom module as follows, seems to be working for me.

function custom_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'system_site_information_settings') {
    $form['anonymous'] = array(
      '#type' => 'hidden',
    );
    $form['site_frontpage'] = array(
      '#type' => 'hidden',
    );
  }
}