All our old tpl.php files need to be converted to twig.

I'm working on page.tpl.php currently.

CommentFileSizeAuthor
#2 2279505.garland.tipplefip-to-twig.patch42.11 KBjoachim
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim’s picture

Status: Active » Fixed

A number of tweaks have been needed in addition to a straight conversion:

* Removed garland_process_html() and garland_process_page() as _color_html_alter() and _color_page_alter() seem to be obsolete. -- AFAICT, color module hooks into the theme without us needing these functions any more.
* Fixed styling for comment 'new' indicator getting applied to whole comment -- core seems to now apply the 'new' CSS class to the whole comment, and so our styles intended for just the 'new' marker were getting applied to the whole comment and causing havok.
* Added zebra class to garland_preprocess_comment(), as core no longer seems to take care of this. -- AFAICT core no longer adds a zebra class ('odd'/'even'), so I've added code here to provide it on comments, as our comment.tpl.php outputs on D7. However, there don't seem to be any styles in Garland for this anyway!
* Removed theme_breadcrumb(): now taken care of by the theme system. -- this was adding extra markup for the benefit of screen readers. This is now done by core.
* Added sidebar body CSS classes to page preprocessor (core seems to no longer provide them) -- on the other hand, core no longer provides body classes to indicate the number of sidebars that are present, so we have to do that. Code copied from Bartik :)

joachim’s picture

joachim’s picture

PS. Haven't included the maintenance tpl file in this, as it looks fairly complicated, and it's not an essential!

  • Commit e95af6e on 8.x-1.x by joachim:
    Issue #2279505 by joachim: Converted template.php file and tpl.php...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.