Jump to content

Change page title


JelleG

Recommended Posts

Hi,

 

I want to change the default page title in the header.tpl.

On many pages in the clientarea, there I load a page header with the following code:

 

{include file="$template/pageheader.tpl" title="Manage DNS"|cat:' '|cat:$domain}

 

Inside the template/pageheader.tpl file, the title is loaded like;

<h2>{$title}</h2>

 

Now I want to change the default page header in the header.tpl file, to load the {$title}.

 

How can I achieve that?

Link to comment
Share on other sites

i've pondered on this question for 24 hours, because I didn't quite understand what it is you wanted to do... :?:

 

header.tpl already calls pageheader.tpl, so do you just want to replace that include with the content of the include?? e.g change...

 

<div class="row">
       {if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())}
           {if $primarySidebar->hasChildren()}
               <div class="col-md-9 pull-md-right">
                   {include file="$template/includes/pageheader.tpl" title=$displayTitle desc=$tagline showbreadcrumb=true}
               </div>
           {/if}
           <div class="col-md-3 pull-md-left sidebar">
               {include file="$template/includes/sidebar.tpl" sidebar=$primarySidebar}
           </div>
       {/if}
       <!-- Container for main page display content -->
       <div class="{if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())}col-md-9 pull-md-right{else}col-xs-12{/if} main-content">
           {if !$primarySidebar->hasChildren() && !$showingLoginPage && !$inShoppingCart && $templatefile != 'homepage'}
               {include file="$template/includes/pageheader.tpl" title=$displayTitle desc=$tagline showbreadcrumb=true}
           {/if}

to...

 

<div class="row">
       {if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())}
           {if $primarySidebar->hasChildren()}
               <div class="col-md-9 pull-md-right">
                   <div class="header-lined">
                       <h1>{$displayTitle}{if $tagline} <small>{$tagline}</small>{/if}</h1>
                           {include file="$template/includes/breadcrumb.tpl"}
                   </div>
               </div>
           {/if}
           <div class="col-md-3 pull-md-left sidebar">
               {include file="$template/includes/sidebar.tpl" sidebar=$primarySidebar}
           </div>
       {/if}
       <!-- Container for main page display content -->
       <div class="{if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())}col-md-9 pull-md-right{else}col-xs-12{/if} main-content">
           {if !$primarySidebar->hasChildren() && !$showingLoginPage && !$inShoppingCart && $templatefile != 'homepage'}
               <div class="header-lined">
                   <h1>{$displayTitle}{if $tagline} <small>{$tagline}</small>{/if}</h1>
                       {include file="$template/includes/breadcrumb.tpl"}
               </div>
           {/if}

to be honest, i'm not sure if there's any benefit to doing that... or if it even answers your question.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated