Follow these steps only if _php/nav-mobile.xsl.txt has been localized.
Change PHP mobile navigation
Step 1
Go to the nav-mobile.xsl.txt
asset and edit.
Replace the code below between <xsl:if test="(count($folders) + count($pages) + count($links)) > 0">
and </xsl:if>
with the following code:
<div id="offCanvas" class="hide-for-large" role="navigation" aria-label="Mobile">
<button class="menu-toggle button hide-for-large" data-toggle="iu-menu">Menu</button>
<div id="iu-menu" class="off-canvas position-right off-canvas-items" data-off-canvas="" data-position="right">
<div class="mobile off-canvas-list" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement" role="navigation" aria-label="Mobile">
<ul>
<xsl:apply-templates mode="navigation-mobile" select="$folders|$pages|$links"/>
</ul>
</div>
<xsl:if test="(count($secondary-folders) + count($secondary-pages) + count($secondary-links)) > 0">
<div class="mobile off-canvas-list" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<ul>
<xsl:apply-templates mode="navigation-mobile" select="$secondary-folders|$secondary-pages|$secondary-links"/>
</ul>
</div>
</xsl:if>
</div>
</div><!-- /#offCanvas -->
Step 2
Save all changes.
Change PHP primary navigation
Follow these steps only if _php/nav-primary.xsl.txt has been localized.
Step 1
Go to the nav-primary.xsl.txt
file and edit.
Step 2
Replace the code between<xsl:if test="(count($folders) + count($pages) + count($links)) > 0"></xsl:if>
and </xsl:template>
with the following:
<xsl:if test="(count($folders) + count($pages) + count($links)) > 0">
<nav aria-label="Main" id="nav-main" role="navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="$dropdown='true'">main show-for-large dropdown</xsl:when>
<xsl:otherwise>main show-for-large</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<ul class="row pad">
<li class="show-on-sticky home"><a href="{$homePath}" aria-label="Home"><xsl:if test="$wcmsInternal!=''"><xsl:attribute name="target"><xsl:text>_parent</xsl:text></xsl:attribute></xsl:if>Home</a></li>
<xsl:apply-templates mode="navigation-primary" select="$folders|$pages|$links"/>
<li class="show-on-sticky search search-img"><a class="search-toggle" href="{$searchPath}"><xsl:if test="$wcmsInternal!=''"><xsl:attribute name="target"><xsl:text>_parent</xsl:text></xsl:attribute></xsl:if><img src="https://assets.iu.edu/web/3.x/css/img/search.png" alt="Search"/></a></li>
</ul>
</nav>
<xsl:if test="(count($secondary-folders) + count($secondary-pages) + count($secondary-links)) > 0">
<div class="nav-secondary show-for-large" role="navigation" aria-label="Secondary">
<div class="row pad">
<ul class="inline separators" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<xsl:apply-templates mode="navigation-primary" select="$secondary-folders|$secondary-pages|$secondary-links"/>
</ul>
</div>
</div>
</xsl:if>
</xsl:if>
Step 3
Submit to save changes.