{*
 **********************************************************
 * Developed by: Team Theme Metro
 * Website: http://www.thememetro.com
 **********************************************************
*}

<div class="body-container">
<section id="main-navbar"{if $templatefile eq "order" && $themesettings.orderform.opcnoheader} class="d-none"{/if}>
    <nav id="nav" class="cros-navbar navbar navbar-expand-lg{if $enablemegamenu} cros-mega{/if}{if $themesettings.headersetting.navhover == "1"} menu-hover{/if}{if $themesettings.headersetting.navbarbg == "1"} primary{elseif $themesettings.headersetting.navbarbg == "2"} dark{else}{/if}{if $themesettings.headersetting.submenu == "1"} submenu1{elseif $themesettings.headersetting.submenu == "2"} submenu2{/if}">
		
		{if $themesettings.headersetting.enablepreheader}
			{include file="$template/core/includes/pre-header.tpl"}
		{/if}
		
		
			<div class="container">
				<!-- Brand and toggle get grouped for better mobile display -->
				<div class="navbar-header">
					<div class="logo-section">
						<button type="button" class="navbar-toggler" data-toggle="collapse" id="navbar-side-toggle">
							<span></span>
						</button>
						<a class="logo" href="{if $themesettings.headersetting.CustomLogoLink}{$themesettings.headersetting.CustomLogoLink}{else}{$WEB_ROOT}/{/if}">
							{if $themesettings.general.enablelogo}
								<img src="{$themesettings.general.logourl}" alt="{$companyname}" class="logo-light" />
								{if $themesettings.general.darklogo}
									<img src="{$themesettings.general.darklogo}" alt="{$companyname}" class="logo-dark" />
								{else}
								<span class="logo-dark">{$companyname}</span>
								{/if}
							{else}
								<span class="logo-dark">{$companyname}</span>
								<span class="logo-light">{$companyname}</span>
							{/if}
						</a>
					</div>
					<div class="top">
						<ul id="mobile-header" class="nav secondary-menu-mobile">
							{include file="$template/core/includes/navbar-right.tpl" navbar=$secondaryNavbar}	
						</ul>
					</div>
					
				</div>

				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse" id="primary-nav">
					<ul class="nav navbar-nav{if $themesettings.headersetting.navright} ml-auto{else} mr-auto{/if}">
						{if $enablemegamenu}
							{include file="$template/core/includes/mega-menu.tpl" navbar=$primaryNavbar}
						{else}
							{include file="$template/includes/navbar.tpl" navbar=$primaryNavbar}
						{/if}
					</ul>

					<ul id="header" class="nav navbar-nav navbar-right d-none d-md-block d-lg-block d-xl-block">
						{include file="$template/core/includes/navbar-right.tpl" navbar=$secondaryNavbar}
					</ul>
				</div><!-- /.navbar-collapse -->
			</div>
		
    </nav>
	
	{include file="$template/includes/validateuser.tpl"}
	{include file="$template/includes/verifyemail.tpl"}
	
	<nav class="navbar-side{if $themesettings.headersetting.sidebarbg eq "1"} primary{elseif $themesettings.headersetting.sidebarbg eq "2"} dark{else}{/if} d-print-none d-lg-none" id="navbar-side">					
		{include file="$template/core/includes/side-menu.tpl"}			
	</nav>
</section>


{if $themesettings.general.enablepromo}
	{if $themesettings.general.promovisibility == '1'}
		{if $loggedin} 
			{include file="$template/core/includes/promo-banner.tpl"}
		{/if}
		
	{elseif $themesettings.general.promovisibility == '2'}
		{if !$loggedin} 
			{include file="$template/core/includes/promo-banner.tpl"}
		{/if}	
	{else}
		{include file="$template/core/includes/promo-banner.tpl"}
	{/if}
{/if}

{include file="$template/includes/network-issues-notifications.tpl"}

{if $themesettings.general.bannerstyle}
{if $templatefile eq "pagebuilder" or $templatefile eq "homepage" or $inShoppingCart or $templatefile eq "order" or $pagetype eq "custom" or $templatefile eq "domain-pricing"}{else}		
<div {if $themesettings.general.bsbgstyle eq "1"}class="small-header header-banner-styled bg-primary position-relative"{else} class="hero-bg-wrap small-header header-banner-styled inverse bg-opacity"{if $themesettings.general.bheaderbg} style="background-image:url('{$themesettings.general.bheaderbg}');"{/if}{/if}>
	{if $skipMainBodyContainer}{else}
	{if $themesettings.general.bsbgstyle eq "1"}
		<div class="cros-bg-shapes-right"></div>
		<div class="cros-bg-shapes-left"></div>
	{/if}
	<div class="container">
		<div class="page-title position-relative">
			{include file="$template/includes/pageheader.tpl" title=$displayTitle desc=$tagline showbreadcrumb=true}
		</div>
	</div>
	{/if}
</div>
{/if}
{/if}

{if $templatefile eq "pagebuilder" or $templatefile eq "homepage" or $pagetype eq "custom"}{else}

<section id="main-body{if $skipMainBodyContainer || $templatefile eq "domain-pricing"}-smb{/if}">
    <div class="container{if $skipMainBodyContainer || $templatefile eq "domain-pricing"}-fluid without-padding{/if}">
		<div class="main-container{if ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren() || $skipMainBodyContainer)}{else}{if $templatefile eq "viewinvoice" || $templatefile eq "viewquote" || $templatefile eq "domain-pricing" || $templatefile == "affiliates" || $templatefile == "upgrade-configure"}{else} main-container-nosidebar{/if}{/if}{if $templatefile == 'clientregister'} main-container-nosidebar{/if}">
			<div class="row">

				{if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren()) && $templatefile !== 'clientregister' || $templatefile == "affiliates"}
					<div class="col-lg-3">
						<div class="sidebar sidebar-primary{if $themesettings.clientarea.sidebars == "1"} default{/if}">
							{include file="$template/includes/sidebar.tpl" sidebar=$primarySidebar}
							{include file="$template/core/includes/sidebar-primary-custom.tpl"}
						</div>
						{if !$inShoppingCart && $secondarySidebar->hasChildren()}
							<div class="d-none d-lg-block sidebar sidebar-secondary{if $themesettings.clientarea.sidebars == "1"} default{/if}">
								{include file="$template/core/includes/sidebar-secondary-custom.tpl"}
								{include file="$template/includes/sidebar.tpl" sidebar=$secondarySidebar}
								{include file="$template/core/includes/sidebar-promo.tpl" sidebar=$secondarySidebar}
							</div>
						{/if}
					</div>
				{/if}
				

			<!-- Container for main page display content -->

			<div class="{if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren()) && $templatefile !== 'clientregister' || $templatefile == "affiliates"}col-lg-9{else}col-12{/if} primary-content">
				{if !$inShoppingCart && !$skipMainBodyContainer && !$themesettings.general.bannerstyle}
					{include file="$template/includes/pageheader.tpl" title=$displayTitle desc=$tagline showbreadcrumb=true}
				{/if}

{/if}