drupal_set_title() is completely incompatible with any kind of render caching.

Similar to drupal_add_link(), drupal_add_css() and drupal_add_js() we should make it work with #attached.

Even if we eventually move #attached to the response object in some way, it'll need to work more or less the same way there too.

Comments

tim.plunkett’s picture

Major +1. Especially since it would remove the need for stupid page callbacks like

function my_module_page() {
  drupal_set_title('my_module');
  return drupal_get_form('my_module_form');
}
catch’s picture

Status: Active » Closed (duplicate)