Add a type parameter to theme_links

Created on 29 June 2011, about 13 years ago
Updated 31 July 2023, about 1 year ago

<menu> has made a comeback in HTML5, we can use menu to build menubar/toolbar type menus.

theme_links seems like a reasonable function to use to build a menubar (e.g. toolbar module uses theme_links), however its hard coded to use <ul>, so in the interest of flexibility I propose we could add a type parameter to theme_links e.g.

$type = $variables['type'];
...
$output .= "<$type" . drupal_attributes($attributes) . '>';
...
$output .= "</$type>";

http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_links/8

Tangentially related issue: #1190210: Convert toolbar.tpl.php to HTML5

Feature request
Status

Needs work

Version

11.0 🔥

Component
Theme 

Last updated 1 day ago

Created by

🇳🇿New Zealand Jeff Burnz

Live updates comments and jobs are added and updated live.
  • html5

    Implements and supports the use of HTML5.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
Production build 0.71.5 2024