0
Welcome Guest! Login
0 items Join Now

SOLVED Change META viewport

    • MarCoTech's Avatar
    • MarCoTech
    • Jr. Rocketeer
    • Posts: 27
    • Thanks: 0

    SOLVED Change META viewport

    Posted 7 years 3 months ago
    • I want to prevent mobile devices from zooming on page content. How can I update a Gantry 5-based website to do this? I do not see a configuration in the Joomla backend for setting the META viewport. I assume I have to update a PHP file directly, but cannot locate it.

      Here's what my site currently has:
      <meta name="viewport" content="width=device-width, initial-scale=1.0">


      Here's what I want my site to have:
      <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Change META viewport

    Posted 7 years 3 months ago
    • You will need to create an override for page_head.html.twig

      copy /media/gantry5/engines/nucleus/templates/page_head.html.twig

      to /templates/xxxxxxxxx/custom/engine/templates/

      Then change line 24

      Please be very careful to observe any changes in Gantry - you may need to revisit your override as Gantry 5 gets updated.


      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • MarCoTech's Avatar
    • MarCoTech
    • Jr. Rocketeer
    • Posts: 27
    • Thanks: 0

    Re: SOLVED Change META viewport

    Posted 7 years 3 months ago
    • Worked perfectly. Thanks Mark.

Time to create page: 0.054 seconds