Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2009
    Posts
    10
    Plugin Contributions
    0

    Default Placing stylesheet links in footer

    Hello,
    I was trying to figure out again on how to move the stylesheet links that appear in the header and move them to the footer section. Did it for one site, but can't remember how to do it again. Using the newest version of zen cart. Any suggestions?

  2. #2
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Placing stylesheet links in footer

    If you still have access to "the one site" you could compare a vanilla install of that Zen Cart version to the site and see what differences exist and determine from there what it took.

    Otherwise, might suspect that may have installed a plugin such as Numinix' CSS/JS loader or implemented something similar by moving the code section(s) from the template's common area into either an observer to load at the end of the page or specifically into a file at the end of the page as well, whether footer, main_page, or the like...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Placing stylesheet links in footer

    I know many "optimization tools" recommend making such a move, but do keep in mind that many templates also have dependencies on some of the things in those stylesheets, and will appear broken on-screen until the stylesheets load, and if you move them to the end of the HTML then they'll load even later, meaning your customers will see things shifting around on the screen while it all happens. Just double-checking that that's what you desire?

    The code that loads the stylesheets is normally in your template's html_header.php file. You can cut all that out of there and put it in your tpl_footer.php file and then start troubleshooting whatever issues you encounter from there.

    If your optimizer is also suggesting to move your javascripts to the footer, be aware that that will break ALL javascript that gets embedded into the page before any of your footer-loaded js dependencies are processed. Test everything carefully if you're going down that path.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. placing footer outside of mainwrapper
    By gotduhka in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Jan 2012, 05:48 AM
  2. Placing Amazon Referral Links as Products - Possible?
    By zcnewb009 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 14 May 2010, 09:32 PM
  3. 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
  4. Placing links
    By MoonCatcher in forum General Questions
    Replies: 1
    Last Post: 10 Aug 2008, 07:26 PM
  5. Placing banners below the footer?
    By mlm2005 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Jul 2006, 01:47 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