diff options
author | 2020-01-21 22:48:18 +0100 | |
---|---|---|
committer | 2020-01-21 22:48:20 +0100 | |
commit | 8e538eebc56d4d3d32cf62aca9030478bd60d548 (patch) | |
tree | 75caa97780a4adfe5c6328f0c54219cf9fe78811 | |
parent | Merge pull request #5814 from 3D-I/ticket/15079 (diff) | |
download | phpbb-8e538eebc56d4d3d32cf62aca9030478bd60d548.tar.gz phpbb-8e538eebc56d4d3d32cf62aca9030478bd60d548.tar.bz2 phpbb-8e538eebc56d4d3d32cf62aca9030478bd60d548.zip |
[ticket/16316] Fix breadcrumbs markup validation
PHPBB3-16316
-rw-r--r-- | phpBB/styles/prosilver/template/navbar_header.html | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index 77f5dae0c0..fa750cd49a 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -178,32 +178,41 @@ </ul> <ul id="nav-breadcrumbs" class="nav-breadcrumbs linklist navlinks" role="menubar"> - <!-- DEFINE $MICRODATA = ' itemtype="http://schema.org/ListItem" itemprop="itemListElement" itemscope' --> + {% set MICRODATA = 'itemtype="https://schema.org/ListItem" itemprop="itemListElement" itemscope' %} {% set navlink_position = 1 %} - <!-- EVENT overall_header_breadcrumbs_before --> - <li class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList"> - <!-- IF U_SITE_HOME --> - <span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemtype="https://schema.org/Thing" itemscope itemprop="item" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="name">{L_SITE_HOME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> - <!-- ENDIF --> - <!-- EVENT overall_header_breadcrumb_prepend --> - <span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemtype="https://schema.org/Thing" itemscope itemprop="item" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="name">{L_INDEX}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> - - <!-- BEGIN navlinks --> - <!-- EVENT overall_header_navlink_prepend --> - <span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{navlinks.U_VIEW_FORUM}" itemtype="https://schema.org/Thing" itemscope itemprop="item"><span itemprop="name">{navlinks.FORUM_NAME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> - <!-- EVENT overall_header_navlink_append --> - <!-- END navlinks --> - <!-- EVENT overall_header_breadcrumb_append --> + + {% EVENT overall_header_breadcrumbs_before %} + + <li class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList"> + + {% if U_SITE_HOME %} + <span class="crumb" {{ MICRODATA }}><a href="{{ U_SITE_HOME }}" id="{{ U_SITE_HOME | e('html_attr') }}" itemtype="https://schema.org/Thing" itemscope itemprop="item" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="name">{{ L_SITE_HOME }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> + {% endif %} + + {% EVENT overall_header_breadcrumb_prepend %} + <span class="crumb" {{ MICRODATA }}><a href="{{ U_INDEX }}" id="{{ U_INDEX | e('html_attr') }}" itemtype="https://schema.org/Thing" itemscope itemprop="item" accesskey="h" data-navbar-reference="index">{% if not U_SITE_HOME %}<i class="icon fa-home fa-fw"></i>{% endif %}<span itemprop="name">{{ L_INDEX }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> + + {% for navlinks in navlinks %} + {% set NAVLINK_NAME = navlinks.BREADCRUMB_NAME | default(navlinks.FORUM_NAME) %} + {% set NAVLINK_LINK = navlinks.U_BREADCRUMB | default(navlinks.U_VIEW_FORUM) %} + + {% EVENT overall_header_navlink_prepend %} + <span class="crumb" {{ MICRODATA }}{% if navlinks.MICRODATA %} {{ navlinks.MICRODATA }}{% endif %}><a href="{{ NAVLINK_LINK }}" id="{{ NAVLINK_LINK | e('html_attr') }}" itemtype="https://schema.org/Thing" itemscope itemprop="item"><span itemprop="name">{{ NAVLINK_NAME }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> + {% EVENT overall_header_navlink_append %} + {% endfor %} + + {% EVENT overall_header_breadcrumb_append %} </li> - <!-- EVENT overall_header_breadcrumbs_after --> - <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH --> + {% EVENT overall_header_breadcrumbs_after %} + + {% if S_DISPLAY_SEARCH and not S_IN_SEARCH %} <li class="rightside responsive-search"> - <a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}" role="menuitem"> - <i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH}</span> + <a href="{{ U_SEARCH }}" title="{{ lang('SEARCH_ADV_EXPLAIN') }}" role="menuitem"> + <i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{{ lang('SEARCH') }}</span> </a> </li> - <!-- ENDIF --> + {% endif %} </ul> </div> |