0
votes

I am looking to change just a few attributes for the default Liferay 7 theme:

  • Left Justify the navbar
  • Hide the Search control in the navbar
  • Allow a second level to each menu

It seems this is best done using a Themelet? Curious if someone could point me to an existing implementation I could use as a starting point for such a customization.

Thanks, Randy

1

1 Answers

0
votes

To allow a seconde level or ( Child of Child) you should add another loop inside each element. Here is the FreeMarker code to put into navigation.ftl, and you can add you CSS on it.

<nav id="navigation" role="navigation">

<div class="row">
    <div class="col-md-9">
        <ul class="nav1">
 
			<#list nav_items as nav_item>
			<li><a href="${nav_item.getURL()}">${nav_item.getName()}</a>
						
				 <#if nav_item.hasChildren()>
					<div class="fulldrop">
					
					<#list nav_item.getChildren() as nav_child>
					
					<div class="col-xs-4">
						<#assign  navchild_name = nav_child.getName() />
					 	
						 	<h3>${nav_child.getName()}</h3>
						 	
						 	<br>	
						 		<#if nav_child.hasChildren()>
						 			
						 			<ul>
						 				<#list  nav_child.getChildren() as nav_child>
						 				<li><a href="${nav_child.getURL()}">${nav_child.getName()}</a></li>
						 				</#list>
						 			</ul>
						 			
						 			</#if>  
					</div>			
						
				 	</#list>
				 	</div>
				 </#if>
			</li>
			</#list>
   		</ul>
     </div>
     
</div>

</nav>