Results 1 to 8 of 8

Thread: issues with header.tpl

  1. #1
    Join Date
    Feb 2007
    Location
    Melbourne, Australia
    Posts
    71

    Default issues with header.tpl

    I'm trying to edit my header.tpl file in my portal template in two ways. But I'm having issues. As soon as I make any valid changes, the template breaks. These are the two changes I'm trying to make:

    I want to change the title:

    <title>{$companyname} - {$pagetitle}{if $kbarticle.title} - {$kbarticle.title}{/if}</title>

    to

    <title>{$pagetitle}{if $kbarticle.title} - {$kbarticle.title}{/if} - {$companyname}</title>

    so the page name appears before the company name. It's such a simple change, but as soon as I do this, the template breaks and it's all over the page.

    The second change I'm trying to do is to put in a favicon.ico file, but inserting this line in the head of my header.tpl file:

    <link rel="icon" type="image/x-icon" href="templates/{$template}/favicon.ico">

    and I've got the favicon.ico file uploaded into that directory. Again, if I make this simple change, the template breaks and it's all over the page. I need to re-upload my unedited version to fix it, not even undoing the changes and then uploading the file fixes it either.

    Hoping someone here has a solution for this.
    Jason Rhodes
    Cube Web Solutions
    www.cubewebsolutions.com.au
    WHMCS Customer since February 2007

  2. #2
    Join Date
    Sep 2007
    Location
    Jimboomba, Qld. AU
    Posts
    2,291

    Default

    Those changes should be fine...
    What editor are you using to save the file?

  3. #3
    Join Date
    Feb 2007
    Location
    Melbourne, Australia
    Posts
    71

    Default

    Dreamweaver, and then I upload with Dreamweaver, and I've tried uploading with my WS_FTP as well, which works for any thing use, but whenever I change the tpl files I seem to have dramas.
    Jason Rhodes
    Cube Web Solutions
    www.cubewebsolutions.com.au
    WHMCS Customer since February 2007

  4. #4
    Join Date
    Sep 2007
    Location
    Jimboomba, Qld. AU
    Posts
    2,291

    Default

    Get yourself NotePad++ and FileZilla
    In notepad++ set the default file encoding to utf-8 without BOM
    Then you should be set

    EDIT: links for you
    http://filezilla-project.org/download.php
    http://notepad-plus-plus.org/release/5.8.7
    Last edited by sparky; 03-09-11 at 06:42 AM.

  5. #5
    Join Date
    Feb 2007
    Location
    Melbourne, Australia
    Posts
    71

    Default

    I just got Notepad ++ thanks.

    I've got all my sites setup in WS_FTP which I prefer as I paid for it last year, the pro version.

    Should I be uploading the .tpl files in binary or ascii mode?
    Jason Rhodes
    Cube Web Solutions
    www.cubewebsolutions.com.au
    WHMCS Customer since February 2007

  6. #6
    Join Date
    Sep 2007
    Location
    Jimboomba, Qld. AU
    Posts
    2,291

    Default

    a tpl file is basically a text file just like a html file so it should be ascii mode

  7. #7
    Join Date
    Feb 2007
    Location
    Melbourne, Australia
    Posts
    71

    Default

    By the way, using Notepad ++ as you suggested has worked perfectly. I knew there was nothing wrong with the coding change I had done.

    This also explains why when I cicked undo in Dreamweaver and then uploaded, it still did not work. Obviously Dreamweaver is not good for editing .tpl files.
    Jason Rhodes
    Cube Web Solutions
    www.cubewebsolutions.com.au
    WHMCS Customer since February 2007

  8. #8
    Join Date
    Sep 2007
    Location
    Jimboomba, Qld. AU
    Posts
    2,291

    Default

    IMHO... not much good for anything at all.

    Glad you got it sorted

Similar Threads

  1. How to call wordpress header in header.tpl
    By dick1980 in forum Customisation & Integration Questions
    Replies: 4
    Last Post: 07-18-11, 04:33 PM
  2. header.tpl to header.php
    By milestonemedia in forum General Discussion
    Replies: 1
    Last Post: 06-28-10, 09:27 PM
  3. changes to header.tpl, homepage.tpl, etc.
    By JerusaHost- Mark in forum Customisation & Integration Questions
    Replies: 2
    Last Post: 05-17-10, 07:03 PM
  4. some help with the header.tpl
    By Carlos5 in forum Customisation & Integration Questions
    Replies: 5
    Last Post: 11-25-09, 08:04 PM
  5. header.tpl
    By skmd in forum Customisation & Integration Questions
    Replies: 19
    Last Post: 09-29-09, 07:28 PM