Layouts
Managing store layouts and module positions in OpenCart 4
Layouts in OpenCart 4 give you complete control over the structure of your store's pages. Each layout defines which modules appear in specific positions (like sidebars, headers, or content areas) and which store routes (URL patterns) use that layout. This powerful feature allows you to create unique page designs for different types of content.
Default Layouts
OpenCart 4 includes several pre-defined layouts for common page types:
Default
common/home
Home page and general fallback layout
Product
product/product
Individual product pages
Category
product/category
Category listing pages
Manufacturer
product/manufacturer
Brand/brand listing pages
Information
information/information
Static content pages (About Us, Contact, etc.)
Article
cms/article
Blog/article pages (if CMS enabled)
Topic
cms/topic
Blog topic pages (if CMS enabled)
Tip: You can modify the default layouts or create entirely new layouts to match your design needs. The Default layout cannot be deleted but can be modified.
Accessing Layouts
Log in to Admin Panel
Open your browser and navigate to your OpenCart admin URL (typically yourstore.com/admin).
Enter your administrator credentials to log in.
Navigate to Design → Layouts
From the admin dashboard, go to the main menu and click Design, then select Layouts from the dropdown menu.
You can also use the quick search: type "Layouts" in the admin search bar.
View Layouts List

You'll see the layout management interface showing all existing layouts.
The list displays layout names, associated routes, and action buttons for editing or deleting.
Creating a New Layout
Step 1: Click Add New
Click the Add New button (+) in the top-right corner of the layout list.
Configure Layout Settings

Fill in the layout configuration form:
Layout Name
Layout Name Requirements 📝
Required: Yes
Length: 3-64 characters
Purpose: Internal name for admin reference
Example: "Homepage Special Layout", "Product Detail Custom"
Layout Routes
Route Configuration ⚠️
Store: Select which store this layout applies to (for multi-store setups)
Route: Enter the URL route pattern (e.g.,
product/productfor all product pages)Multiple Routes: You can add multiple route-store combinations to a single layout
Module Positions
Positioning Modules 🔢
Content Top: Above main content area
Content Bottom: Below main content area
Column Left: Left sidebar
Column Right: Right sidebar
Sort Order: Controls display order within each position (lower numbers appear first)
Save the Layout
Click Save to create the new layout. You'll see a success message confirming the layout has been created.
Editing an Existing Layout
Locate the Layout
From the layout list, find the layout you want to edit. You can use the search filter or browse through the list.
Click the Edit button (pencil icon) next to the layout name.
Modify Layout Settings
Make your changes in the layout form:
Layout Name: Update the name if needed
Routes: Add, remove, or modify route-store associations
Module Positions: Reorder modules, add new modules, or remove existing ones
Use the same configuration guidelines as when creating a new layout.
Save Changes
Click Save to update the layout settings.
You'll see a success message confirming the layout has been updated.
Note: You cannot delete the Default layout if it's assigned as the default store layout. Other layouts can be deleted if they're not in use by products, categories, manufacturers, information pages, articles, or topics.
Layout Configuration Details
Define Layout Name
The layout name is the internal identifier used in the admin panel. It should be descriptive and unique.
Click the Layout Name section below for detailed requirements.
Configure Layout Routes
Routes determine which store pages will use this layout. You can assign multiple route-store combinations.
Click the Layout Routes section below for route patterns and examples.
Arrange Module Positions
Modules are placed in specific positions on the page. Each position can contain multiple modules with sort order control.
Click the Module Positions section below for position descriptions and adding modules.
Layout Name
Required: Yes
Length: 3-64 characters
Purpose: Internal reference name for administrators
Validation: Must be unique and descriptive
Layout Routes
Routes determine which pages use this layout. Each route consists of:
Store
Which store this applies to (multi-store)
Default Store, Store 2
Route
URL pattern that triggers this layout
product/product, information/contact, common/home
Common Route Patterns:
product/product- All product pagesproduct/category- All category pagesproduct/manufacturer- All manufacturer pagesinformation/information- All information pagescms/article- All article pages (CMS)cms/topic- All topic pages (CMS)common/home- Home pageaccount/*- Customer account pagescheckout/*- Checkout pages
Route Matching: OpenCart uses the most specific route match. If no specific route matches, it falls back to the Default layout.
Module Positions

Modules can be placed in four main positions:
Content Top
Above main content
Banners, featured products, promotions
Content Bottom
Below main content
Related products, additional information
Column Left
Left sidebar
Categories, filters, navigation
Column Right
Right sidebar
Cart, search, special offers
Sort Order: Within each position, modules are displayed in ascending sort order (0 appears before 1).
Adding Modules:
Select a module from the available modules list
Choose a position (Content Top, Content Bottom, Column Left, Column Right)
Set the sort order (0, 1, 2, etc.)
Click "Add Module" to add it to the layout
Use Cases for Custom Layouts
1. Homepage Special Layout 🏠
Create a unique homepage with different module arrangements:
Route:
common/homeModules: Featured products in Content Top, latest products in Content Bottom, special offers in Column Right
Purpose: Highlight promotions and new arrivals on the homepage
2. Product Page Enhancements 🛍️
Customize product pages with additional modules:
Route:
product/productModules: Related products in Content Bottom, manufacturer info in Column Left, also bought in Column Right
Purpose: Increase cross-selling and provide better product information
3. Category Page Optimization 📂
Improve category browsing experience:
Route:
product/categoryModules: Category filters in Column Left, featured category products in Content Top, banner in Content Bottom
Purpose: Help customers find products faster and promote category-specific offers
4. Checkout Process Simplification 🛒
Streamline the checkout process:
Route:
checkout/*Modules: Remove sidebars for full-width checkout, add trust badges in Content Bottom
Purpose: Reduce distractions and increase conversion rates
Practical Example: Creating a Homepage Special Layout
Let's walk through creating a custom homepage layout from start to finish.
Plan Your Layout
Before creating the layout, decide what modules you want on your homepage:
Content Top: Featured products slider
Content Bottom: Latest products grid
Column Right: Special offers banner
Column Left: Category navigation
Sketch the layout to visualize module placement.
Create the Layout
Go to Design → Layouts
Click Add New
Enter Layout Name: "Homepage Special"
Add Route: Store: "Default Store", Route:
common/homeClick Save to create the empty layout
Add Modules to Positions
Content Top: Select "Featured" module, set sort order 0
Content Bottom: Select "Latest" module, set sort order 0
Column Right: Select "Banner" module (configured with special offers), set sort order 0
Column Left: Select "Category" module, set sort order 0
Click Add Module for each, then Save the layout.
Test the Layout
Visit your store homepage
Verify all modules appear in correct positions
Check mobile responsiveness
Test different screen sizes
Adjust sort orders or module settings if needed.
Success: You've created a custom homepage layout that highlights featured products, shows latest arrivals, and provides navigation—all optimized for conversion.
Integration with Other Features
Multi-Store Support 🏪
Layouts support multi-store configurations:
Create different layouts for different stores
Assign layouts to specific stores via the route configuration
Each store can have completely different page structures
Module Management 🧩
Layouts work with all OpenCart modules:
Install and configure modules in Extensions → Modules
Add configured modules to layouts in Design → Layouts
Each module instance can be placed in different positions across different layouts
Template System Integration 🎨
Layouts complement the template system:
Templates control the visual design (HTML/CSS)
Layouts control the module placement and page structure
Together they provide complete design control
Best Practices
Layout Strategy 🎯
Start Simple: Begin with the default layouts and modify as needed
Consistent Structure: Use similar module arrangements across similar page types
Mobile-Friendly: Consider how layouts appear on mobile devices
Performance: Limit the number of modules per page for faster loading
Route Management ⚠️
Specific First: More specific routes should be configured before general ones
Avoid Conflicts: Ensure routes don't overlap unintentionally
Test Thoroughly: Check all route patterns work as expected
Document Routes: Keep a list of custom routes for future reference
Module Placement 🛠️
Logical Order: Place modules in logical reading order (top to bottom, left to right)
Visual Hierarchy: Important modules should have higher visibility
Balance: Distribute modules evenly across positions
Empty Positions: Leave empty positions if not needed (they won't display)
Troubleshooting
Common Issues
Layout not applying to pages 🔍
Possible Causes:
Route pattern doesn't match the page URL
Another layout has a more specific route match
Layout is not assigned to the correct store
Solution: Check the route configuration and ensure it matches the page's route exactly.
Cannot delete layout 🗑️
Possible Causes:
Layout is assigned as the default store layout
Products, categories, or other entities are using the layout
Permission restrictions
Solution:
Check if layout is the default in System → Settings → Store
Reassign entities to other layouts first
Verify user has permission to delete layouts
Modules not appearing 📦
Possible Causes:
Module is disabled
Module is not added to the layout
Module position doesn't exist in the template
Sort order conflict
Solution:
Check module status in Extensions → Modules
Verify module is added to the layout in correct position
Check template supports the position
Adjust sort order if modules overlap
Layout conflicts between stores 🏪
Possible Causes:
Route-store combinations overlap
Default layout conflicts with store-specific layouts
Solution: Review all route assignments and ensure each store-route combination is unique.
Performance Considerations ⚡
Each additional module on a page increases load time
Complex layouts with many route checks can slow down page routing
Consider caching strategies for frequently accessed layouts
Regularly review and remove unused layouts
Documentation Summary 📋
You've now learned how to:
Create and manage layouts in OpenCart 4
Configure layout routes and module positions
Use layouts for different page types and stores
Integrate layouts with modules and templates
Apply best practices for layout management
Next Steps:
Last updated