Updating 6.2 Theme Templates
Step 2 of 3
Follow these steps to update navigation.ftl
:
-
Below the
<nav class="${nav_css_class}" id="navigation" role="navigation">
element, add the heading below to improve accessibility for screen readers:<h1 class="hide-accessible"> <@liferay.language key="navigation" /> </h1>
-
Remove the
nav_item_attr_selected
variable declaration at the top, and add the layout declaration shown below instead, to access the layout. Don’t forget to remove all uses ofnav_item_attr_selected
throughout the rest of the template:<#assign nav_item_layout = nav_item.getLayout() />
-
Replace the
${nav_item.icon()}
variable in the<a aria-labelledby="layout_${nav_item.getLayoutId()}"...</a>
anchor with the element below:<@liferay_theme["layout-icon"] layout=nav_item_layout />
-
Remove the
nav_child_attr_selected
variable from the bottom of the template, including all uses throughout the rest of the template.
The navigation template is updated. You can update portlet.ftl
next.