{if file_exists("templates/$template/includes/overwrites/pageheader.tpl")}
    {include file="{$template}/includes/overwrites/pageheader.tpl"}  
{else}
    {if $RSheadercenter}
        <div class="main-header-top">
            <h1 class="main-header-title">
            {if $desc}
                <span class="text-lighter text-small">{$desc}</span>
                <br />
            {/if}
                {$title}
            </h1>
            {if $showbreadcrumb}{include file="$template/includes/breadcrumb.tpl"}{/if}
        </div>
    {else}
        {if $RSheadersearch}
            <div class="main-header-top">
                <h1 class="main-header-title">{$title}</h1>
                <div class="search-group">
                    <div class="search-field">
                        <input type="text" id="table-search" class="form-control" placeholder="{$LANG.tableentersearchterm}">
                        <div class="search-field-icon"><i class="lm lm-search" aria-hidden="true"></i></div>
                        <button class="hidden" data-clear-table-search><i class="ls ls-close"></i></button>             
                    </div>
                    {if $templatefile == 'clientareaproducts'}
                        <a tabindex="0" class="btn btn-primary-faded" href="{$WEB_ROOT}/cart.php"><i class="ls ls-plus"></i>{$rslang->trans('generals.add_new')}</a>
                    {/if}
                    {if $templatefile == "clientareadomains"}
                        <a tabindex="0" class="btn btn-primary-faded" href="{$WEB_ROOT}/cart.php?a=add&domain=register.php"><i class="ls ls-plus"></i>{$rslang->trans('generals.add_new')}</a>
                    {/if}
                    {if $templatefile == "supportticketslist" && $RSThemes.layouts.vars.type == 'navbar-left'}
                        <a tabindex="0" class="btn btn-primary-faded" href="{$WEB_ROOT}/submitticket.php">{$LANG.navopenticket}</a>
                    {/if}   
                </div>
            </div>
        {elseif $RSheaderRenewalSearch}
            <div class="main-header-top">
                <h1 class="main-header-title">{$title}</h1>
                <div class="search-group">
                    <div class="search-field">                
                        <input type="text" {if isset($RSThemes['pages'][$templatefile]['optionvars']['renewalContent']) && $RSThemes['pages'][$templatefile]['optionvars']['renewalContent'] == 'table'}id="table-search"{else}id="domainRenewalFilter"{/if} class="form-control" placeholder="{$LANG.tableentersearchterm}">
                       <div class="search-field-icon"><i class="lm lm-search" aria-hidden="true"></i></div>     
                    </div>

                </div>
            </div>
        {elseif $RSheaderServicesRenewalSearch}
            <div class="main-header-top">
                <h1 class="main-header-title">{$title}</h1>
                <div class="search-group">
                    <div class="search-field">                
                        <input type="text" id="serviceRenewalFilter" class="form-control" placeholder="{$LANG.tableentersearchterm}">
                       <div class="search-field-icon"><i class="lm lm-search" aria-hidden="true"></i></div>     
                    </div>
                </div>
            </div>
        {elseif $RSheaderCustomButton || $RSheaderCustomSearch}
             <div class="main-header-top">
                <h1 class="main-header-title">{$title}</h1>
                <div class="search-group">
                    {if $RSheaderCustomSearch}  
                        <div class="search-field">
                            {$RSheaderCustomSearch}
                            <div class="search-field-icon"><i class="lm lm-search" aria-hidden="true"></i></div>                
                        </div>
                    {/if}
                    {if $RSheaderCustomButton}
                        {$RSheaderCustomButton}
                    {/if}    
                </div>
            </div>
        {elseif $templatefile == "products"}
            <h1 class="main-header-title">
                {$title}
            </h1>
            {if $productGroup.tagline}
                <p>{$productGroup.tagline}</p>
            {/if}
        {elseif $templatefile == "knowledgebasearticle"}
            <h1 class="main-header-title">
                {$kbarticle.title}
            </h1>
        {elseif $templatefile == "viewticket" && ( isset($RSThemes['pages'][$templatefile]['optionvars']['page_layout']) && $RSThemes['pages'][$templatefile]['optionvars']['page_layout'] == "new")}
            <div class="main-header-top">
                <h1 class="main-header-title">{$title}</h1>
                {if !$closedticket && $showCloseButton}
                    <div class="search-group">
                        <button tabindex="0" class="btn btn-outline" data-toggle="modal" data-target="#closeTicket">
                            {$rslang->trans('support.close_ticket')}
                        </button>
                    </div>
                {/if}
            </div>
        {else}
            <h1 class="main-header-title">
                {$title}
            </h1>
        {/if}
        {if $showbreadcrumb || $desc}
            <div class="main-header-bottom">
                {if $showbreadcrumb}{include file="$template/includes/breadcrumb.tpl"}{/if}
            </div>
        {/if}
    {/if}
{/if}