Tomi14 Posted January 16, 2023 Share Posted January 16, 2023 (edited) I would like to place the top and left menus in an H2 tag (it would be nice if the first level of the menu was h2, and the sublevel was h3) I think this is in ps_mainmenu.tpl file, but I don't know how to put h2. I wanted to see it in another tpl file, I even found something in header_type_1.tpl, but ther is "<h1><a href=" instead just "href". {assign var=_counter value=0} {function name="menu" nodes=[] depth=0 parent=null} {if $nodes|count} <ul class="top-menu" {if $depth == 0}id="top-menu"{/if} data-depth="{$depth}"> {foreach from=$nodes item=node} <li class="{$node.type}{if $node.current} current {/if}" id="{$node.page_identifier}"> {assign var=_counter value=$_counter+1} <a class="{if $depth >= 0}dropdown-item{/if}{if $depth === 1} dropdown-submenu{/if}" href="{$node.url}" data-depth="{$depth}" {if $node.open_in_new_window} target="_blank" {/if} > {if $node.children|count} {* Cannot use page identifier as we can have the same page several times *} {assign var=_expand_id value=10|mt_rand:100000} <span class="float-xs-right hidden-md-up"> <span data-target="#top_sub_menu_{$_expand_id}" data-toggle="collapse" class="navbar-toggler collapse-icons"> <i class="material-icons add"></i> <i class="material-icons remove"></i> </span> </span> {/if} {$node.label} </a> {if $node.children|count} <div {if $depth === 0} class="menu-dropdown sub-menu js-sub-menu collapse"{else} class="collapse"{/if} id="top_sub_menu_{$_expand_id}"> {menu nodes=$node.children depth=$node.depth parent=$node} </div> {/if} </li> {/foreach} </ul> {/if} {/function} <div class="theme-menu menu js-top-menu position-static hidden-sm-down" id="_desktop_top_menu"> {menu nodes=$menu.children} <div class="clearfix"></div> </div> Edited January 16, 2023 by Tomi14 (see edit history) Link to comment Share on other sites More sharing options...
Tomi14 Posted March 12, 2023 Author Share Posted March 12, 2023 I can pay for this Link to comment Share on other sites More sharing options...
JBW Posted March 12, 2023 Share Posted March 12, 2023 You can include the <ul></ul> in a <h2></h2> but this will problably mess up your CSS styles so you need to adjust your custom.css accordingly. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now