Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2009
    Location
    Scotland
    Posts
    76
    Plugin Contributions
    0

    Default How can I add a mobile tag into every page?

    Hello,

    To make the site easier to read on mobile devices I want to add the following tag into the head of every page:

    Code:
    <meta name="viewport" content="width=device-width, initial-scale=1">
    I have searched the forums but cannot find any way of doing this.

    I would be extremely grateful if anyone can tell me where to insert the code to do this.

    Many thanks in advance

    Tog Porter

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: How can I add a mobile tag into every page?

    Quote Originally Posted by Togfather View Post
    Hello,

    To make the site easier to read on mobile devices I want to add the following tag into the head of every page:

    Code:
    <meta name="viewport" content="width=device-width, initial-scale=1">
    I have searched the forums but cannot find any way of doing this.

    I would be extremely grateful if anyone can tell me where to insert the code to do this.

    Many thanks in advance

    Tog Porter
    Add the code to
    /includes/templates/YOUR_TEMPLATE/common/html_header.php

    Cheers
    RodG

  3. #3
    Join Date
    Dec 2009
    Location
    Scotland
    Posts
    76
    Plugin Contributions
    0

    Default Re: How can I add a mobile tag into every page?

    Absolutely brilliant! Thank you so much. I have been trying to get this done for days :-)

  4. #4
    Join Date
    Mar 2012
    Posts
    315
    Plugin Contributions
    0

    Default Re: How can I add a mobile tag into every page?

    Quote Originally Posted by RodG View Post
    Add the code to
    /includes/templates/YOUR_TEMPLATE/common/html_header.php

    Cheers
    RodG
    RodG, I don't have that file in my common folder. I'm using a template called abagon ... I want to do this,, and also, isn't this where I will add my Google Analytics code if I want to add the Analytics Code somewhere that shows up on every page. Thanks!!!!

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How can I add a mobile tag into every page?

    Quote Originally Posted by Johnnycopilot View Post
    RodG, I don't have that file in my common folder.
    Then ... just like ANY other customization one does with their templates, you first copy the one from template_default and then make the changes in the new copy you've made, in your own template's matching directory structure.
    .

    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.

  6. #6
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: How can I add a mobile tag into every page?

    Quote Originally Posted by Johnnycopilot View Post
    RodG, I don't have that file in my common folder. I'm using a template called abagon ... I want to do this,, and also, isn't this where I will add my Google Analytics code if I want to add the Analytics Code somewhere that shows up on every page. Thanks!!!!
    Do as DrByte suggests.

    I *was* going to say add it into the zencart default html_header.php file (/includes/templates/template_default/common/html_header.php) but making a copy and placing it into your template folder is a *much* better idea as it will survive future Zencart updates. Added it to the default header means the addition will be lost during such updates.

    Cheers
    RodG

  7. #7
    Join Date
    Mar 2012
    Posts
    315
    Plugin Contributions
    0

    Default Re: How can I add a mobile tag into every page?

    Thanks, but now that I've checked into it, I believe that something more needs to be done instead of that. I started a new thread here. If either of you get time, will you please read what I want to do? I believe it's the 4th post down, where I ask about installing a new zen-cart template, here http://www.zen-cart.com/showthread.p...obile-Friendly .. Thanks!!

 

 

Similar Threads

  1. v139h How do I add a header to every page?
    By Dothra in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 28 Feb 2012, 07:09 AM
  2. Replies: 0
    Last Post: 26 Aug 2009, 05:31 AM
  3. How can I Add ALT tag to categoryImgListing?
    By toussi in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 6 Sep 2008, 08:41 PM
  4. how do i add a message on every page?
    By MachaNeko in forum General Questions
    Replies: 8
    Last Post: 7 May 2008, 02:17 PM
  5. want to add a comments tag to every page
    By bumba000 in forum General Questions
    Replies: 9
    Last Post: 13 Jun 2007, 10:07 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