Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293450

Move miscellaneous system classes from preprocess to templates

$
0
0

Move classes out of the preprocess functions and into the Twig templates. Use the addClass() attribute method to add classes in the template. Use the clean_class filter to filter class names, if necessary. Maintain all existing functionality and ensure all existing class names are still in the markup, even ones that are inherited.

See the following issues for more detailed examples:
#2217731: Move field classes out of preprocess and into templates
#2254153: Move node classes out of preprocess and into templates

See this change record for information about using the addClass() method:
https://www.drupal.org/node/2315471

See this change record for more information about the phase 1 process of moving class from preprocess to templates:
https://www.drupal.org/node/2325067

Preprocess Functions Modified

template_preprocess_admin_block_content
template_preprocess_status_report
template_preprocess_system_themes_page

Twig Templates Modified

admin-block-content.html.twig
seven/templates/admin-block-content.html.twig
status-report.html.twig
system-themes-page.html.twig


Viewing all articles
Browse latest Browse all 293450

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>