Follow-up from #1939064: Convert theme_links() to Twig.

This is from @farrington comment #1939064-67: Convert theme_links() to Twig

In the preprocess the heading.level is not assigned with any value, and on the other hand in the old theme_links() it only sett statically to 'h2'.

So there seems be no reason to keep any of that in the preprocess nor in the twig file.

The documentation is also edited to reflect these changes.

Comments

joelpittet’s picture

Assigned: joelpittet » Unassigned
Status: Active » Postponed
Cottser’s picture

Issue tags: +theme system cleanup

Tagging. Thanks @joelpittet!

mgifford’s picture

Issue summary: View changes
Status: Postponed » Active
Related issues: +#1939064: Convert theme_links() to Twig

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joelpittet’s picture

Version: 8.1.x-dev » 8.2.x-dev
Status: Active » Needs review
FileSize
6.54 KB

I wonder if this is possible, my guess is D9 material...

Status: Needs review » Needs work

The last submitted patch, 5: leave_the_heading_level-2116359-5.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review
FileSize
2.32 KB
8.87 KB

Test changes

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joelpittet’s picture

Title: Leave the heading level in the template and out of the variables for theme_links. » Leave the heading level in the template and out of the variables for links.html.twig
Issue tags: +Novice, +Needs screenshots
ricardoamaro’s picture

FileSize
262.23 KB

Only local images are allowed.

The Screenshot shows this patch tested on the left (on simplytest.me) compared to a local clean installation on the right of Drupal 8.3.x

It looks like the theme h3 was preserved and the new code is applied.

ricardoamaro’s picture

Issue tags: -Needs screenshots
ricardoamaro’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Novice
lauriii’s picture

Status: Reviewed & tested by the community » Needs work

We can't change the way this works inside Classy and Stable. This change should be limited to System module only.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joelpittet’s picture

#13 Still needs to be addressed, just a simple re-roll

joelpittet’s picture

Status: Needs review » Needs work