Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32
  1. #1
    Join Date
    Jan 2005
    Location
    NY
    Posts
    149
    Plugin Contributions
    0

    Default Different header/footer on home page only.

    I understand how to override the header and footer for other pages, like the checkout or shopping cart, but I can't get it to work for the main page.

    I tried putting a modified version of tpl_main_page.php into /templates/my_template/index, but it applies the changes to my product category pages, not only the home page.

    Can anyone show me how to accomplish this using the $this_is_home_page variable?

    I know the concept, but don't know how to implement the code.

    Currently my header design is contained within a file called top.php which is called from whithin tpl_header.php.
    I was thinking of creating a new file, top_main.php and calling it only when the current page is the home page.

    Something like this:

    if $this_is_home_page
    {
    include('top_main.php');
    }
    else
    {
    include('top.php');
    }

    I am completely lost when it comes to writing the actual code, and i'm not even sure this is the correct place to implement it.
    My cart is version 1.3.6.

    Any help would be appreciated.

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Different header/footer on home page only.

    Well that's basically correct except that the if condition needs to go in brackets i.e.
    if ($this_is_home_page)
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Sep 2007
    Posts
    15
    Plugin Contributions
    0

    Default Want Flash header to play only once

    I'm having a similar problem. It's cool to have a Flash header. But I only want it to run one time. I'd like to be able to control that in the flash movie. Right now, every time I go to a new page, the damn movie starts playing over again.

    I'd like to get it to just stop one time. Or maybe it's easier to just change it out depending upon the category the user clicks on.

    Boy I could really use some help here. Any advice is welcome.

    Test site is at: http://208.106.156.104/ZenCart/

  4. #4
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Want Flash header to play only once

    Admin > Tools > Pages Define Editor: define_main_page.php

    Put your Flash code in there and it will only show on the Index page. If you want the Flash code on every page but not to run automatically, you would need to change your Flash code and make sure you have a Start / Stop button; similar to what you see at myspace.com.

  5. #5
    Join Date
    Sep 2007
    Posts
    15
    Plugin Contributions
    0

    Default Re: Different header/footer on home page only.

    I've got a stop in the actual flash file. I don't understand what you mean. Here's the entry I put into my tpl_header.php file.

    <script type="text/javascript" src="includes/templates/red_passion/jscript/swfobject.js"></script>
    <div id="flashcontent">
    This text is replaced by the Flash movie.
    </div>
    <script type="text/javascript">
    var so = new SWFObject("includes/templates/red_passion/images/flash/hbtc_flash.swf", "HBTC", "840", "240", "0", "#ffffff");
    so.write("flashcontent");
    </script>

    Can I put a simple "stop" in here some place?

  6. #6
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Different header/footer on home page only.

    In order to have Start / Stop buttons you need to edit the (swf) file in whatever program you used to create the (swf) file.

  7. #7
    Join Date
    Sep 2007
    Posts
    15
    Plugin Contributions
    0

    Default Re: Different header/footer on home page only.

    I understand how to start/stop my flash file.

    That's not the problem.

    The problem is that every time I click on a link to navigate through my site, the flash file reloads and starts over again. It gets obnoxious to see that flash file reloading every time the user hits a link.

    I've got to believe there's some option in javascript that will keep the file from reloading. Any jscript geniuses out there that can help?

  8. #8
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Different header/footer on home page only.

    Quckest, easiest way is to create two header files,
    one containing your flash code, which will show on
    main index page, and 2nd header, for all other pages,
    which contains static image of your fully loaded flash
    file, for all other pages in zencart.
    As per
    http://www.zen-cart.com/forum/showpo...44&postcount=4
    Last edited by misty; 4 Mar 2008 at 07:58 AM. Reason: added extra info

  9. #9
    Join Date
    Sep 2007
    Posts
    15
    Plugin Contributions
    0

    Default Re: Different header/footer on home page only.

    Love that idea. However I have zero idea on how to execute something like that. Any chance you'd be interested in walking me through it?

  10. #10
    Join Date
    Mar 2008
    Posts
    18
    Plugin Contributions
    0

    Default Re: Different header/footer on home page only.

    I'm trying to place my flash header on the main page only. I don't understand the following code:

    if ($this_is_home_page) {
    include('top_main.php');
    }
    else
    {
    include('top.php');
    }


    Just cut and past this code to the main index?? Please help...I'm new at this and really don't no how to implement this. Thanks

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. v138a Show Banner Display (Footer) ONLY on home page
    By genat1974 in forum General Questions
    Replies: 3
    Last Post: 10 Mar 2012, 08:25 PM
  2. v138a Show Banner Display (Footer) ONLY on home page
    By genat1974 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 9 Mar 2012, 10:55 PM
  3. How can I make my home page totally blank? - no footer, no header
    By gnomiXa in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 May 2010, 11:33 PM
  4. New footer link on home page only
    By cjkeane in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 26 Aug 2008, 06:18 PM
  5. EZ Page Footer links & Footer look different only on Home
    By DivaVocals in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 17 Aug 2008, 11:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR