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

      Sunshine And March Vibes (2025 Wallpapers Edition)

      June 1, 2025

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

      June 1, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 1, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 1, 2025

      My top 5 must-play PC games for the second half of 2025 — Will they live up to the hype?

      June 1, 2025

      A week of hell with my Windows 11 PC really makes me appreciate the simplicity of Google’s Chromebook laptops

      June 1, 2025

      Elden Ring Nightreign Night Aspect: How to beat Heolstor the Nightlord, the final boss

      June 1, 2025

      New Xbox games launching this week, from June 2 through June 8 — Zenless Zone Zero finally comes to Xbox

      June 1, 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

      Student Record Android App using SQLite

      June 1, 2025
      Recent

      Student Record Android App using SQLite

      June 1, 2025

      When Array uses less memory than Uint8Array (in V8)

      June 1, 2025

      Laravel 12 Starter Kits: Definite Guide Which to Choose

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

      My top 5 must-play PC games for the second half of 2025 — Will they live up to the hype?

      June 1, 2025
      Recent

      My top 5 must-play PC games for the second half of 2025 — Will they live up to the hype?

      June 1, 2025

      A week of hell with my Windows 11 PC really makes me appreciate the simplicity of Google’s Chromebook laptops

      June 1, 2025

      Elden Ring Nightreign Night Aspect: How to beat Heolstor the Nightlord, the final boss

      June 1, 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 Linux Flaws Allow Password Hash Theft via Core Dumps in Ubuntu, RHEL, Fedora

    June 2, 2025
    Security

    Google AI Edge Gallery: Unleash On-Device AI Power on Your Android (and Soon iOS!)

    June 2, 2025
    Leave A Reply Cancel Reply

    Hostinger

    Continue Reading

    CVE-2025-32290 – LambertGroup Sticky HTML5 Music Player SQL Injection

    Common Vulnerabilities and Exposures (CVEs)

    Cybercriminals Targeting Latin America with Sophisticated Phishing Scheme

    Development

    This ‘lifelike’ AI granny is infuriating phone scammers. Here’s how – and why

    Development

    Enhance User Experience with These Minimalist Shopify Themes

    Development
    Hostinger

    Highlights

    Databases

    Demystifying Amazon DynamoDB on-demand capacity mode

    March 16, 2025

    As AWS Solutions Architects, we regularly work with customers to optimize their Amazon DynamoDB deployments.…

    Building Azure DevOps CI Pipelines for SPFx

    December 31, 2024
    Arch Linux saluta Redis e adotta Valkey: cosa cambia per la comunità GNU/Linux

    Arch Linux saluta Redis e adotta Valkey: cosa cambia per la comunità GNU/Linux

    April 19, 2025

    Avowed: Tips and tricks to manage your essence

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

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