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

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 31, 2025

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

      May 31, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 31, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 31, 2025

      How to install SteamOS on ROG Ally and Legion Go Windows gaming handhelds

      May 31, 2025

      Xbox Game Pass just had its strongest content quarter ever, but can we expect this level of quality forever?

      May 31, 2025

      Gaming on a dual-screen laptop? I tried it with Lenovo’s new Yoga Book 9i for 2025 — Here’s what happened

      May 31, 2025

      We got Markdown in Notepad before GTA VI

      May 31, 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

      Oracle Fusion new Product Management Landing Page and AI (25B)

      May 31, 2025
      Recent

      Oracle Fusion new Product Management Landing Page and AI (25B)

      May 31, 2025

      Filament Is Now Running Natively on Mobile

      May 31, 2025

      How Remix is shaking things up

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

      How to install SteamOS on ROG Ally and Legion Go Windows gaming handhelds

      May 31, 2025
      Recent

      How to install SteamOS on ROG Ally and Legion Go Windows gaming handhelds

      May 31, 2025

      Xbox Game Pass just had its strongest content quarter ever, but can we expect this level of quality forever?

      May 31, 2025

      Gaming on a dual-screen laptop? I tried it with Lenovo’s new Yoga Book 9i for 2025 — Here’s what happened

      May 31, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»How to Enable Full-Width Layouts in Optimizely Commerce (Spire)

    How to Enable Full-Width Layouts in Optimizely Commerce (Spire)

    January 7, 2025

    When building websites in Optimizely Commerce (Spire), you may need to create sections that span the entire page width. Full-width sections are essential for design elements such as banners, hero images, and background sections. Optimizely Commerce (Spire) provides a flexible framework that makes it easy to configure and implement full-width layouts, allowing developers to create visually engaging designs with minimal effort. This guide will walk you through utilizing this feature to seamlessly create full-width sections.

    How to Create Full-Width Sections

    Step 1: Folder Structure

    • First, ensure you have already created a blueprint under the directory srcFrontEndmodulesblueprints. For example, you might have a blueprint named CustomBlueprint.
    • Navigate to the CustomBlueprint/src. Ensure that a Start.tsx file exists in this directory. If it does not, create and add this file.

    Step 2: Understand the Options in Start.tsx

    The Start.tsx file is the entry point for setting up the main themes, custom widgets, and pages. It uses Mobius styling principles to ensure everything looks consistent, flexible, and accessible. These principles provide a unified design, allowing for easy customization of themes, colors, typography, and other UI elements while maintaining a seamless, responsive user experience across devices.

    In the Start.tsx file, you will find two options for configuring the full-width layout through the style guide:

    • setPreStyleGuideTheme: If you add your code under this method, you can update the full-width settings directly from the content admin interface
    • setPostStyleGuideTheme: If you use this function, the full-width settings will be fixed, and you won’t be able to modify them from the content admin interface.

    Step 3: Full-Width Configuration Code

    Optimizely Commerce (Spire) already provides a built-in solution to configure sections like the header, content, and footer to span the full page width. To enable full-width for these sections, use the following code snippet:

    Basic code configuration

    Explanation

    • header: { isFullWidth: true }: Ensures the header section spans the full width of the page.
    • content: { isFullWidth: true }: The main content area extends from edge to edge, perfect for displaying banners or immersive visuals.
    • footer: { isFullWidth: true }: Sets the footer to full width, ideal for footers with background colors or design elements that must reach the screen’s edges.

    Step 4: Integrate the Code

    Add the above code to the Start.tsx file within one of the theme configuration functions (setPreStyleGuideTheme or setPostStyleGuideTheme), depending on whether you want to allow updates to the full-width settings from the content admin interface.

    Code integration

    Step 5: How to Update the Full-Width Configuration from the Content Admin

    After configuring the full-width settings in the Start.tsx file, Optimizely Commerce (Spire) provides an easy way to manage and update these configurations directly from the Content Admin interface.

    • Go to the Content Admin and navigate to the Style GuideStyle guide section admin
    • In the Site Configurations section, you will find the Full Width settings.

    Admin full width

    • Click on each option (Header, Content, and Footer) to see a toggle that allows you to make the section full-width.

    Admin full width edit

    Note: You can only update the full-width setting using the setPreStyleGuideTheme option in the Start.tsx file.

    • After updating the value in the Settings modal, ensure you save the changes.

    Step 6: How to Use the Full-width Option on Actual Pages

    • To use the full-width option on pages, add a Row widget. Edit the Row widget, and you will see a Full Width Checkbox option (by default, this option will be unchecked).

    Full width row default state

    • To make the section full width, check the checkbox.

         Note: Once the checkbox is checked, any content in that row will be displayed at full width.

    Full width row checked state

    Conclusion

    Optimizely Commerce (Spire) provides a straightforward and flexible solution for creating full-width sections, making it easier to design visually engaging websites. Following the steps outlined in this guide, you can quickly enable full-width layouts for your header, content, and footer. Whether you prefer to manage these configurations through the Content Admin interface or directly in the code, Optimizely Commerce offers the flexibility to create seamless, immersive designs that enhance the overall user experience. With full control over these settings, you can customize your site’s layout to fit your specific design needs while maintaining a consistent and responsive interface across devices.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleCodeSOD: One Month
    Next Article Windows 11 24H2 to get new features in February – what’s coming

    Related Posts

    Security

    New Apache InLong Vulnerability (CVE-2025-27522) Exposes Systems to Remote Code Execution Risks

    May 31, 2025
    Security

    New Linux Flaws Allow Password Hash Theft via Core Dumps in Ubuntu, RHEL, Fedora

    May 31, 2025
    Leave A Reply Cancel Reply

    Hostinger

    Continue Reading

    CVE-2025-36527 – Zohocorp ManageEngine ADAudit Plus SQL Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Leveraging Traccar for Enhanced Fleet Management App Functionality

    Development

    ADI | Snap One and Perficient Win Coveo Relevance Accelerator Award

    Development

    Firefox Nightly: arriva il gestore profili

    Linux
    Hostinger

    Highlights

    Development

    DistillGrasp: A Unique AI Method for Integrating Features Correlation with Knowledge Distillation for Depth Completion of Transparent Objects

    August 11, 2024

    RGB-D cameras have a difficult time accurately capturing the depth of transparent objects because of…

    ChatGPT-powered, Free Course Maker (Embed Courses on your website)

    June 19, 2024

    Samsung Unpacked 2025: How to watch and what to expect

    January 14, 2025

    Breadcrumb Navigation: Do You Really Need It?

    February 10, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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