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.
Support from Acquia helps fund testing for Drupal Acquia logo

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

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