Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 13, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 13, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 13, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 13, 2025

      This $4 Steam Deck game includes the most-played classics from my childhood — and it will save you paper

      May 13, 2025

      Microsoft shares rare look at radical Windows 11 Start menu designs it explored before settling on the least interesting one of the bunch

      May 13, 2025

      NVIDIA’s new GPU driver adds DOOM: The Dark Ages support and improves DLSS in Microsoft Flight Simulator 2024

      May 13, 2025

      How to install and use Ollama to run AI LLMs on your Windows 11 PC

      May 13, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Community News: Latest PECL Releases (05.13.2025)

      May 13, 2025
      Recent

      Community News: Latest PECL Releases (05.13.2025)

      May 13, 2025

      How We Use Epic Branches. Without Breaking Our Flow.

      May 13, 2025

      I think the ergonomics of generators is growing on me.

      May 13, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      This $4 Steam Deck game includes the most-played classics from my childhood — and it will save you paper

      May 13, 2025
      Recent

      This $4 Steam Deck game includes the most-played classics from my childhood — and it will save you paper

      May 13, 2025

      Microsoft shares rare look at radical Windows 11 Start menu designs it explored before settling on the least interesting one of the bunch

      May 13, 2025

      NVIDIA’s new GPU driver adds DOOM: The Dark Ages support and improves DLSS in Microsoft Flight Simulator 2024

      May 13, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»How to Customize Zoom Level in Optimizely CMS Spire

    How to Customize Zoom Level in Optimizely CMS Spire

    August 22, 2024

    In some situations, we need to set a maximum zoom scale or disable zoom completely on our website. This blog explains how to achieve that behavior in Optimizely Spire.

    In Optimizely, the meta viewport tag rendered on the page comes from the srcFrontEndmodulesserver-frameworksrcPageRenderer.tsx file. However, since this file is part of the server framework, we cannot override it directly.

    The meta viewport tag in the PageRenderer.tsx file is as per below. Optimizely sets the initial zoom scale to 1 by default and does not specify a maximum scale value.

    In the browser, it looks as shown below.

     

    Due to limitations, we cannot override the PageRenderer.tsx file, so we have another option to update the meta viewport.

    That option is the utility file addMaximumScaleToViewport.ts. This file is present under srcFrontEndmodulesclient-frameworksrcCommonUtilitiesaddMaximumScaleToViewport.ts. Using this utility, we can customize the zoom level.

    How to Override the Page Render File in Our Blueprint/Theme

    Assume you have already created a blueprint under `srcFrontEndmodulesblueprints`, for example, `CustomBlueprint`.
    Inside the blueprint, create the following folder structure: `src > Overrides > Common > Utilities`
    Then copy the utility file from `srcFrontEndmodulesclient-frameworksrcCommonUtilitiesaddMaximumScaleToViewport.ts` directory and add that file inside `srcFrontEndmodulesCustomBlueprintsrcOverridesCommonUtilities`

    How to Make Changes to the File

    We need to update the highlighted section. Modify the maximum-scale attribute to reflect the correct zoom value regardless of the desired zoom level.

    You can also add the user-scalable attribute with the maximum-scale option here.

    How to Call the Utility File

    By default, Optimizely does not call this utility file on all pages.

    To ensure it renders on every site page, we can call the utility file in the PageLayout.tsx file.

    We can use PageLayout.tsx file to call utility file. This file is present in srcFrontEndmodulescontent-librarysrcPageLayout.tsx directory.

    To override this file, add it to the srcFrontEndmodulesblueprintsCustomBlueprintsrcOverrides directory.

    Now you have the overridden file in the mentioned directory.

    Then call the utility as shown below.

     

    In certain situations, there may be a need to either prevent zooming on a website or to provide a zoom option. This blog offers a straightforward approach to customizing zoom levels in Optimizely Spire.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleOverview of CDP in Salesforce Marketing Cloud
    Next Article UX in Universal Design Series: Compatibility in Health Systems for Accessibility and Usability – 8

    Related Posts

    Machine Learning

    This AI Paper Investigates Test-Time Scaling of English-Centric RLMs for Enhanced Multilingual Reasoning and Domain Generalization

    May 14, 2025
    Machine Learning

    Agent-Based Debugging Gets a Cost-Effective Alternative: Salesforce AI Presents SWERank for Accurate and Scalable Software Issue Localization

    May 14, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    rahul900day/laravel-console-spinner

    Development

    Build a computer vision-based asset inventory application with low or no training

    Machine Learning

    CVE-2025-29573 – Mezzanine CMS Forms Module XSS Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Image Dimension Validation with Laravel’s dimensions Rule

    Development

    Highlights

    Development

    China-Aligned MirrorFace Hackers Target EU Diplomats with World Expo 2025 Bait

    November 7, 2024

    The China-aligned threat actor known as MirrorFace has been observed targeting a diplomatic organization in…

    Forget Dyson: Roborock’s wet-dry vacuum left my floors spotless (and it’s $180 for Black Friday)

    November 18, 2024

    Weirdest Threat Group Names: The Funny, Scary and Just Plain Weird

    March 17, 2025

    Replicate Laravel PHP Client

    May 1, 2024
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.