Problem

  • When setting a CSS class in $page['#attributes']['class'] via hook_page_build() it is not output.

Goal

  • Allow to set page classes on the $page render element.
CommentFileSizeAuthor
#5 drupal8.page-classes.5.patch843 bytessun
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch drupal8.page-classes.5.patch. Unable to apply patch. See the log in the details link for more information. View
drupal8.page-classes.0.patch789 bytessun
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal8.page-classes.0.patch. Unable to apply patch. See the log in the details link for more information. View
drupal.page-classes-D7-do-not-test.0.patch769 bytessun
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal.page-classes-D7-do-not-test.0.patch. Unable to apply patch. See the log in the details link for more information. View
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

brahmjeet789’s picture

please will you elaborate it more deeply .

sun’s picture

I've clarified the issue summary.

sun’s picture

Issue tags: -needs backport to D7

drupal8.page-classes.0.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +needs backport to D7

The last submitted patch, drupal8.page-classes.0.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
FileSize
843 bytes
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch drupal8.page-classes.5.patch. Unable to apply patch. See the log in the details link for more information. View

Re-rolled against HEAD.

sun’s picture

Issue tags: -needs backport to D7

#5: drupal8.page-classes.5.patch queued for re-testing.

sun’s picture

Issue summary: View changes

Updated issue summary.

Status: Needs review » Needs work

The last submitted patch, 5: drupal8.page-classes.5.patch, failed testing.

joachim’s picture

Issue summary: View changes

hook_page_build() no longer exists. Is this issue still relevant?

joelpittet’s picture

Assigned: sun » Unassigned
Status: Needs work » Closed (cannot reproduce)

Hook doesn't exist any longer.
template_preprocess_html() may be where you want to do this or in the html.html.twig