Jump to content

Six Theme - using 'home-shortcuts' on all pages as menu?


Recommended Posts

Hi Guys,

I am customising the Six theme (first customisation ive attempted) and am using the home-shortcuts menu as a secondary menu. However this is only showing on the home page? Any ideas how i can show it on all WHMCS pages? I cannot seem to find any information on this? It is coded in the header.tpl.

 

Here is my site

 

It is a work in progress.

 

Any information would be most appreciated.

 

Regards Donna

Link to comment
Share on other sites

Hello Donna,

 

Correct it is loaded in header.tpl:

 

   <div class="home-shortcuts">
       <div class="container">
           <div class="row">
               <div class="col-md-4 hidden-sm hidden-xs text-center">
                   <p class="lead">
                       {$LANG.howcanwehelp}
                   </p>
               </div>
               <div class="col-sm-12 col-md-8">
                   <ul>
                       {if $registerdomainenabled || $transferdomainenabled}
                           <li>
                               <a id="btnBuyADomain" href="domainchecker.php">
                                   <i class="fa fa-globe"></i>
                                   <p>
                                       {$LANG.buyadomain} <span>»</span>
                                   </p>
                               </a>
                           </li>
                       {/if}
                       <li>
                           <a id="btnOrderHosting" href="cart.php">
                               <i class="fa fa-hdd-o"></i>
                               <p>
                                   {$LANG.orderhosting} <span>»</span>
                               </p>
                           </a>
                       </li>
                       <li>
                           <a id="btnMakePayment" href="clientarea.php">
                               <i class="fa fa-credit-card"></i>
                               <p>
                                   {$LANG.makepayment} <span>»</span>
                               </p>
                           </a>
                       </li>
                       <li>
                           <a id="btnGetSupport" href="submitticket.php">
                               <i class="fa fa-envelope-o"></i>
                               <p>
                                   {$LANG.getsupport} <span>»</span>
                               </p>
                           </a>
                       </li>
                   </ul>
               </div>
           </div>
       </div>
   </div>

 

It's also wrapped in a if statement to load it only on the homepage along with the domain checker but as you have that disabled we can ignore that.

 

To adjust this comment out the following if statement (line 136):

 

{if $templatefile == 'homepage'}

 

and the closing tag (line 214):

 

{/if}

Link to comment
Share on other sites

Thank you Zomex, for you swift reply.

 

I have already commented out the following entire section:

 

<!--{if $templatefile == 'homepage'}-->
   <!--<section id="home-banner">
       <div class="container text-center">
           {if $registerdomainenabled || $transferdomainenabled}
               <h2>{$LANG.homebegin}</h2>
               <form method="post" action="domainchecker.php">
                   <div class="row">
                       <div class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1">
                           <div class="input-group input-group-lg">
                               <input type="text" class="form-control" name="domain" placeholder="{$LANG.exampledomain}" />
                               <span class="input-group-btn">
                                   {if $registerdomainenabled}
                                       <input type="submit" class="btn btn-warning" value="{$LANG.search}" />
                                   {/if}
                                   {if $transferdomainenabled}
                                       <input type="submit" name="transfer" class="btn btn-info" value="{$LANG.domainstransfer}" />
                                   {/if}
                               </span>
                           </div>
                       </div>
                   </div>

                   <!--{include file="$template/includes/captcha.tpl"}-->
               <!--</form>
           {else}
               <h2>{$LANG.doToday}</h2>
           {/if}
       </div>

   </section>-->

 

But when i log in to the client area, it still doesn't show? I was starting ot think that maybe it has to be included somewhere else?

Link to comment
Share on other sites

No problem

 

Can you paste the full contents of your header.tpl file here?

 

No Problem, here it is. Please note that i have just commented out code at present rather than remove it thus making sure i am not deleting anything important :)

 

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2.0">
     <base href="https://www.sitewidedesign.co.uk/" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
     <meta name="description" content="Simple, affordable web design and managed hosting in the East Midlands" />
     <meta name="generator" content="Joomla! - Open Source Content Management" />
     <title>Home - Site Wide Design</title> 

  <link href="https://www.sitewidedesign.co.uk/templates/gk_simplicity/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
     <link rel="stylesheet" href="/media/k2/assets/css/k2.fonts.css?v2.7.0" type="text/css" />
     <link rel="stylesheet" href="/templates/gk_simplicity/css/k2.css?v2.7.0" type="text/css" />
     <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" type="text/css" />
     <link rel="stylesheet" href="/cache/gk/a97b7507e168aad9d2768a2d912949b9.css.php" type="text/css" />
     <link rel="stylesheet" href="https://www.sitewidedesign.co.uk/modules/mod_je_social/css/style.css" type="text/css" />


  <link rel="apple-touch-icon" href="https://www.sitewidedesign.co.uk/templates/gk_simplicity/images/touch-device.png">
     <link rel="apple-touch-icon-precomposed" href="https://www.sitewidedesign.co.uk/templates/gk_simplicity/images/touch-device.png">
     <link rel="stylesheet" href="https://www.sitewidedesign.co.uk/templates/gk_simplicity/css/small.desktop.css" media="(max-width: 1150px)" />
     <link rel="stylesheet" href="https://www.sitewidedesign.co.uk/templates/gk_simplicity/css/tablet.css" media="(max-width: 1030px)" />
     <link rel="stylesheet" href="https://www.sitewidedesign.co.uk/templates/gk_simplicity/css/small.tablet.css" media="(max-width: 820px)" />
     <link rel="stylesheet" href="https://www.sitewidedesign.co.uk/templates/gk_simplicity/css/mobile.css" media="(max-width: 580px)" />
     <link rel="stylesheet" href="https://www.sitewidedesign.co.uk/hosting/templates/swcustom/css/override.css" />

   {include file="$template/includes/head.tpl"}
{literal}<script type="text/javascript">
var LHCChatOptions = {};
LHCChatOptions.opt = {widget_height:340,widget_width:300,popup_height:520,popup_width:500};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
po.src = '//www.sitewidedesign.co.uk/livesupport/lhc_web/index.php/chat/getstatus/(click)/internal/(position)/middle_right/(ma)/br/(top)/350/(units)/pixels/(leaveamessage)/true?r='+referrer+'&l='+location;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>{/literal}
   {$headoutput}
</head>
<body>
{$headeroutput}

<!--custom header code-->
<header id="gkHeader">
        <div>		
           <div class="gkPage" id="gkHeaderNav">
              <a href="https://www.sitewidedesign.co.uk/" id="gkLogo" class="cssLogo">Site Wide Design</a>
              <div id="gkMainMenu">
                 <nav id="gkExtraMenu" class="gkMenu">
                    <ul class="gkmenu level0">
                       <li  class="first active"><a href="https://www.sitewidedesign.co.uk/"  class=" first active" id="menu120"  >Home</a></li>
                       <li ><a href="/k2/latest"  id="menu333"  >Blog</a></li>
                       <li ><a href="/faq"  id="menu458"  >FAQ</a></li>
                       <li ><a href="/login/login"  id="menu472"  >Login</a></li>
                       <li  class="last"><a href="/web-hosting"  class=" last" id="menu477"  >Hosting</a></li>
                    </ul>
                 </nav>
              </div>
		 </div>  
<section id="header">

   <div class="container">
       <!-- Top Bar -->
       <div id="top-nav">
           <!-- Language -->
           <!--{if $languagechangeenabled && count($locales) > 1}
               <div class="pull-right nav">
                   <a href="#" class="quick-nav" data-toggle="popover" id="languageChooser"><i class="fa fa-language"></i> {$LANG.chooselanguage} <span class="caret"></span></a>
                   <div id="languageChooserContent" class="hidden">
                       <ul>
                           {foreach from=$locales item=locale}
                               <li><a href="{$currentpagelinkback}language={$locale.language}">{$locale.localisedName}</a></li>
                           {/foreach}
                       </ul>
                   </div>
               </div>
           {/if}-->
           <!-- Login/Account Notifications -->
           <!--{if $loggedin}
               <div class="pull-right nav">
                   <a href="#" class="quick-nav" data-toggle="popover" id="accountNotifications" data-placement="bottom" title="{lang key="notifications"}"><i class="fa fa-info"></i> {$LANG.notifications} ({$clientAlerts|count})</a>
                   <div id="accountNotificationsContent" class="hidden">
                       {foreach $clientAlerts as $alert}
                           <div class="clientalert text-{$alert->getSeverity()}">{$alert->getMessage()}{if $alert->getLinkText()} <a href="{$alert->getLink()}" class="btn btn-xs btn-{$alert->getSeverity()}">{$alert->getLinkText()}</a>{/if}</div>
                       {foreachelse}
                           <div class="clientalert text-success"><i class="fa fa-check-square-o"></i> {$LANG.notificationsnone}</div>
                       {/foreach}
                   </div>
               </div>
           {else}
               <div class="pull-right nav">
                   <a href="#" class="quick-nav" data-toggle="popover" id="loginOrRegister" data-placement="bottom"><i class="fa fa-user"></i> {$LANG.login}</a>
                   <div id="loginOrRegisterContent" class="hidden">
                       <form action="{$systemsslurl}dologin.php" method="post" role="form">
                           <div class="form-group">
                               <input type="email" name="username" class="form-control" placeholder="{$LANG.clientareaemail}" required />
                           </div>
                           <div class="form-group">
                               <div class="input-group">
                                   <input type="password" name="password" class="form-control" placeholder="{$LANG.loginpassword}" required />
                                   <span class="input-group-btn">
                                       <input type="submit" class="btn btn-primary" value="{$LANG.login}" />
                                   </span>
                               </div>
                           </div>
                           <label class="checkbox-inline">
                               <input type="checkbox" name="rememberme" /> {$LANG.loginrememberme} • <a href="pwreset.php">{$LANG.forgotpw}</a>
                           </label>
                       </form>
                       {if $condlinks.allowClientRegistration}
                           <hr />
                           {$LANG.newcustomersignup|sprintf2:'<a href="register.php">':'</a>'}
                       {/if}
                   </div>
               </div>
           {/if}-->
           <!-- Shopping Cart -->
           <!--<div class="pull-right nav">
               <a href="cart.php?a=view" class="quick-nav"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs">{$LANG.viewcart} (</span><span id="cartItemCount">{$cartitemcount}</span><span class="hidden-xs">)</span></a>
           </div>-->

           {if $adminMasqueradingAsClient}
               <!-- Return to admin link-->
               <div class="alert alert-danger admin-masquerade-notice">
                   {$LANG.adminmasqueradingasclient}<br />
                   <a href="logout.php?returntoadmin=1" class="alert-link">{$LANG.logoutandreturntoadminarea}</a>
               </div>
           {elseif $adminLoggedIn}
               <!-- Return to admin link -->
               <div class="alert alert-danger admin-masquerade-notice">
                   {$LANG.adminloggedin}<br />
                   <a href="logout.php?returntoadmin=1" class="alert-link">{$LANG.returntoadminarea}</a>
               </div>
           {/if}

       </div>

       <!--<a href="{$WEB_ROOT}/index.php"><img src="{$WEB_ROOT}/templates/{$template}/img/logo.png" alt="{$companyname}" /></a>-->

   </div>
</section>

<section id="main-menu">

   <nav id="nav" class="navbar navbar-default navbar-main" role="navigation">
       <div class="container">
           <!-- Brand and toggle get grouped for better mobile display -->
           <div class="navbar-header">
               <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                   <span class="sr-only">Toggle navigation</span>
                   <span class="icon-bar"></span>
                   <span class="icon-bar"></span>
                   <span class="icon-bar"></span>
               </button>
           </div>

           <!-- Collect the nav links, forms, and other content for toggling -->
           <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

               <ul class="nav navbar-nav">

                   {include file="$template/includes/navbar.tpl" navbar=$primaryNavbar}

               </ul>

               <ul class="nav navbar-nav navbar-right">

                   {include file="$template/includes/navbar.tpl" navbar=$secondaryNavbar}

               </ul>

           </div><!-- /.navbar-collapse -->
       </div>
   </nav>

</section>

<!--{if $templatefile == 'homepage'}-->
   <!--<section id="home-banner">
       <div class="container text-center">
           {if $registerdomainenabled || $transferdomainenabled}
               <h2>{$LANG.homebegin}</h2>
               <form method="post" action="domainchecker.php">
                   <div class="row">
                       <div class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1">
                           <div class="input-group input-group-lg">
                               <input type="text" class="form-control" name="domain" placeholder="{$LANG.exampledomain}" />
                               <span class="input-group-btn">
                                   {if $registerdomainenabled}
                                       <input type="submit" class="btn btn-warning" value="{$LANG.search}" />
                                   {/if}
                                   {if $transferdomainenabled}
                                       <input type="submit" name="transfer" class="btn btn-info" value="{$LANG.domainstransfer}" />
                                   {/if}
                               </span>
                           </div>
                       </div>
                   </div>

                   <!--{include file="$template/includes/captcha.tpl"}-->
               <!--</form>
           {else}
               <h2>{$LANG.doToday}</h2>
           {/if}
       </div>-->

   </section>
   <div class="home-shortcuts">
       <div class="container">
           <div class="row">
               <div class="col-md-4 hidden-sm hidden-xs text-center">
                   <p class="lead">
                       {$LANG.howcanwehelp}
                   </p>
               </div>
               <div class="col-sm-12 col-md-8">
                   <ul>
                       {if $registerdomainenabled || $transferdomainenabled}
                           <li>
                               <a id="btnBuyADomain" href="hosting/domainchecker.php">
                                   <i class="fa fa-globe"></i>
                                   <p>
                                       {$LANG.buyadomain} <span>»</span>
                                   </p>
                               </a>
                           </li>
                       {/if}
                       <li>
                           <a id="btnOrderHosting" href="hosting/cart.php">
                               <i class="fa fa-hdd-o"></i>
                               <p>
                                   {$LANG.orderhosting} <span>»</span>
                               </p>
                           </a>
                       </li>
                       <!--<li>
                           <a id="btnMakePayment" href="clientarea.php">
                               <i class="fa fa-credit-card"></i>
                               <p>
                                   {$LANG.makepayment} <span>»</span>
                               </p>
                           </a>
                       </li>-->
                       <li>
                           <a id="btnGetSupport" href="hosting/submitticket.php">
                               <i class="fa fa-envelope-o"></i>
                               <p>
                                   {$LANG.getsupport} <span>»</span>
                               </p>
                           </a>
                       </li>
					<li>
                           <a id="btnAccount" href="hosting/clientarea.php">
                               <i class="fa fa-user"></i>
                               <p>
                                   {$LANG.account} <span>»</span>
                               </p>
                           </a>
                       </li>
                   </ul>
               </div>
           </div>
       </div>
   </div>
<!--{/if}-->

<section id="main-body" class="container">

   <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}

 

Again, Thank you for your assistance with my learning curve.

Best Regards

Donna

Link to comment
Share on other sites

Donna,

 

You are using HTML comment syntax

 

<!-- Comment -->

 

where you should use Smarty comment instead

{* Comment *}

 

so you code need to look like the following:

{if $templatefile == 'homepage'}
   {*<section id="home-banner">
       <div class="container text-center">
           {if $registerdomainenabled || $transferdomainenabled}
               <h2>{$LANG.homebegin}</h2>
               <form method="post" action="domainchecker.php">
                   <div class="row">
                       <div class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1">
                           <div class="input-group input-group-lg">
                               <input type="text" class="form-control" name="domain" placeholder="{$LANG.exampledomain}" />
                               <span class="input-group-btn">
                                   {if $registerdomainenabled}
                                       <input type="submit" class="btn btn-warning" value="{$LANG.search}" />
                                   {/if}
                                   {if $transferdomainenabled}
                                       <input type="submit" name="transfer" class="btn btn-info" value="{$LANG.domainstransfer}" />
                                   {/if}
                               </span>
                           </div>
                       </div>
                   </div>

                   {include file="$template/includes/captcha.tpl"}
               </form>
           {else}
               <h2>{$LANG.doToday}</h2>
           {/if}
       </div>

   </section>*}

Link to comment
Share on other sites

Thank you sentq, i have amended the commenting type to the smarty format (my code editor doesn't recognise it as a comment unfortunately). I seem to have rectified the problem. It was relating to my base href, i hadn't used the correct format. Originally i had:

 

<base href="https://www.mydomain.co.uk/" />

 

When i changed it to:

 

    {if $systemurl}<base href="{$systemurl}" />
{/if}

 

Everything started working.

 

I hope this helps if someone else has an issue in the future.

 

Thanks for the support guys.

 

Regards

Donna

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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