Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Moving 'default_nodes_main' to a separate node_form_system_site_information_settings_alter()
will change a form structure because it makes no sense to have a fieldset with only one 'site_frontpage' field in fieldset. Also this setting used in taxonomy pages so we could have other variable for them
$form['front_page'] = array(
'#type' => 'fieldset',
'#title' => t('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),
'#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30)),
'#description' => t('The maximum number of posts displayed on overview pages such as the front page.'),
);
$form['front_page']['site_frontpage'] = array(
Proposed
$form['site_frontpage'] = array(
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal8.node-default-main.1.patch | 2.71 KB | sun |
Comments
Comment #1
sunThanks for creating this issue, @andypost! :)
KISS!
And no, not converting to the config system.
And no, not changing the variable name.
And no, not performing any additional improvements.
Just get this out of the way.
Comment #2
andypostOk :) This changes an order of form fields, anyway let's get this commited and finish #1496542: Convert site information to config system
I think this issue should have follow-up to actually fix this variable.
Comment #3
webchickI'm not at all sure why this is major, but change makes sense.
Committed and pushed to 8.x. Thanks!
Comment #5
xjm