Smarty codes are not rendered properly

All smarty codes are in white color, if else, foreach or comments aren't highlighted.

0
3 comments

Is it a .tpl file? Could you please share the entire file?

0

Thanks for looking into it. It is an html file. I don't see any option to attach a file here.

 

<header id="header" data-plugin-options="">
<div class="header-body">
<div class="header-container container">
<div class="header-row">
<div class="header-column">
<div class="header-row">
<div class="header-logo">
<a href="/">
<img alt="Jaggards" width="100" height="48" data-sticky-width="82" data-sticky-height="40" data-sticky-top="25" src="build/assets/images/Logo.svg">
</a>
</div>
</div>
</div>
<div class="header-column justify-content-end">
<div class="header-row pt-3">
<nav class="header-nav-top">
<ul class="nav nav-pills">

{if !is_null($_menu->get("about us"))}
{foreach $_menu->get("about us")->getRootElements() as $header_0}
<li class="nav-item nav-item-anim-icon d-none d-md-block">
<a class="nav-link pl-0" href="{$header_0->getUrl()}">
<i class="fas fa-angle-right"></i>
{$header_0->getName()}
</a>
</li>
{/foreach}
{/if}

{if !is_null($_menu->get("contact us"))}
{foreach $_menu->get("contact us")->getRootElements() as $header_1}
<li class="nav-item nav-item-anim-icon d-none d-md-block">
<a class="nav-link pl-0" href="{$header_1->getUrl()}">
<i class="fas fa-angle-right"></i>
{$header_1->getName()}
</a>
</li>
{/foreach}
{/if}
{if !is_null($_menu->get("phone"))}
{foreach $_menu->get("phone")->getRootElements() as $header_2}
<li class="nav-item nav-item-left-border nav-item-left-border-remove nav-item-left-border-md-show">
<span class="ws-nowrap">
<i class="fas fa-phone"></i>
{$header_2->getName()}
</span>
</li>
{/foreach}
{/if}
</ul>
</nav>
<div class="header-nav-features">
<div class="header-nav-feature header-nav-features-search d-inline-flex">
<a href="#" class="header-nav-features-toggle" data-focus="headerSearch"><i class="fas fa-search header-nav-top-icon"></i></a>
<div class="header-nav-features-dropdown" id="headerTopSearchDropdown">
<form role="search" action="page-search-results.html" method="get">
<div class="simple-search input-group">
<input class="form-control text-1" id="headerSearch" name="q" type="search" value="" placeholder="Search...">
<span class="input-group-append">
<button class="btn" type="submit">
<i class="fa fa-search header-nav-top-icon"></i>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="header-nav-feature header-nav-features-cart d-inline-flex ml-2">
<a href="#" class="header-nav-features-toggle">
<img src="build/assets/images/icon-cart.svg" width="14" alt="" class="header-nav-top-icon-img">
<span class="cart-info d-none">
<span class="cart-qty">1</span>
</span>
</a>
<div class="header-nav-features-dropdown" id="headerTopCartDropdown">
<ol class="mini-products-list">
<li class="item">
<a href="#" title="Camera X1000" class="product-image"><img src="img/products/product-1.jpg" alt="Camera X1000"></a>
<div class="product-details">
<p class="product-name">
<a href="#">Camera X1000 </a>
</p>
<p class="qty-price">
1X <span class="price">$890</span>
</p>
<a href="#" title="Remove This Item" class="btn-remove"><i class="fas fa-times"></i></a>
</div>
</li>
</ol>
<div class="totals">
<span class="label">Total:</span>
<span class="price-total"><span class="price">$890</span></span>
</div>
<div class="actions">
<a class="btn btn-dark" href="#">View Cart</a>
<a class="btn btn-primary" href="#">Checkout</a>
</div>
</div>
</div>
</div>
</div>
<div class="header-row">
<div class="header-nav pt-1">
<div class="header-nav-main header-nav-main-effect-1 header-nav-main-sub-effect-1">
<nav class="collapse">
<ul class="nav nav-pills" id="mainNav">
{if !is_null($_menu->get("Header Menu"))}
{foreach $_menu->get("Header Menu")->getRootElements() as $mainNavItem}
{if $mainNavItem->getCustomFieldText('isMegaMenu') }
<li class="dropdown dropdown-mega">
<a class="dropdown-item dropdown-toggle" href="{$mainNavItem->getUrl()}">
{$mainNavItem->getName()}
</a>
{if $mainNavItem->getChildren()->count() > 0 }
<ul class="dropdown-menu">
<li>
<div class="dropdown-mega-content">
<div class="row">
{foreach $mainNavItem->getChildren() as $subNavItem}
<div class="col-lg-3">
<span class="dropdown-mega-sub-title">{$subNavItem->getName()}</span>
{if $subNavItem->getChildren()->count() > 0}
<ul class="dropdown-mega-sub-nav">
{foreach $subNavItem->getChildren() as $subSubNavItem}
<li><a class="dropdown-item" href="{$subSubNavItem->getUrl()}">{$subSubNavItem->getName()}</a></li>
{/foreach}
</ul>
{/if}
</div>
{/foreach}

</div>
</div>
</li>
</ul>
{/if}
</li>
{else}
<li class="dropdown">
<a class="dropdown-item dropdown-toggle" href="{$mainNavItem->getUrl()}">
{$mainNavItem->getName()}
</a>
{if $mainNavItem->getChildren()->count() > 0 }
<ul class="dropdown-menu">
{foreach $mainNavItem->getChildren() as $subNavItem}
{if $subNavItem->getChildren()->count() > 0}
<li class="dropdown-submenu">
<a class="dropdown-item" href="{$subNavItem->getUrl()}">{$subNavItem->getName()}</a>
<ul class="dropdown-menu">
{foreach $subNavItem->getChildren() as $subSubNavItem}
<li>
<a class="dropdown-item" href="{$subSubNavItem->getUrl()}">{$subSubNavItem->getName()}</a>
</li>
{/foreach}
</ul>
</li>
{else}
<li>
<a class="dropdown-item" href="{$subNavItem->getUrl()}">
{$subNavItem->getName()}
</a>
</li>
{/if}
{/foreach}
</ul>
{/if}
</li>
{/if}
{/foreach}
{/if}
</ul>
</nav>
</div>
{if !is_null($_menu->get("Social media"))}
<ul class="header-social-icons social-icons d-none d-sm-block">
{foreach $_menu->get("Social media")->getRootElements() as $socialMedia}
<li class="social-icons-{$socialMedia->getName()}">
<a href="{$socialMedia->getUrl()}" target="_blank" title="{$socialMedia->getName()}">
<i class="fab fa-{$socialMedia->getCustomFieldText('icon')}"></i>
</a>
</li>
{/foreach}
</ul>
{/if}
<button class="btn header-btn-collapse-nav" data-toggle="collapse" data-target=".header-nav-main nav">
<i class="fas fa-bars"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</header>

 

0

@Moncy

Your file seems to be fine for me (2021.1.4)

1. Please show how the file looks in the editor: I want to see the Editor tab (icon, file name) + ideally Project View panel as well (the same info for that file; you can blur the rest files if so desired)

2. Locate this file in the Project View panel and invoke shortcut for "View | Quick Documentation" on it (Ctrl+Q here on Windows) -- it will show a popup with the file info. Need to see that popup.

1

Please sign in to leave a comment.