Xgenious/ docs
Products
Get support

Auto-Override System

Nazmart uses a file-based auto-override system. No PHP registration is required — simply place a file at the right path and it will automatically take priority over the default. This works the same way for all page types.

Warning

💡 ✅ Zero configuration needed Drop a file in the right location and it automatically overrides. The system scans your theme directory on every request activation.

Frontend Pages (theme:: namespace)

All frontend pages are resolved through the theme:: Blade namespace with a fallback chain. Any file you place inside themes/mytheme/views/ automatically overrides the same path in the default theme.

PageFile to create in your themeBlade namespace call
Shop listingviews/frontend/shop/all-products.blade.phptheme::frontend.shop.all-products
Product detailviews/frontend/shop/product_details/product-details.blade.phptheme::frontend.shop.product_details.product-details
Cartviews/frontend/shop/cart/cart.blade.phptheme::frontend.shop.cart.cart
Checkoutviews/frontend/shop/checkout/checkout.blade.phptheme::frontend.shop.checkout.checkout
Navbarviews/header/navbar.blade.phptheme::header.navbar
Breadcrumbviews/header/breadcrumb.blade.phptheme::header.breadcrumb
Footer widgetsviews/footer/widget-area.blade.phptheme::footer.widget-area
Contact pageviews/frontend/pages/contact.blade.phptheme::frontend.pages.contact

Module Pages (blog::, etc.)

Pages rendered by Laravel modules (Blog, etc.) use their own Blade namespaces like blog::. To override these, create files inside views/modules/{module-name}/. The system automatically prepends your theme's path to the module namespace.

PageFile to createModule namespace
Blog listingviews/modules/blog/tenant/frontend/blog/blog-all.blade.phpblog::tenant.frontend.blog.blog-all
Blog singleviews/modules/blog/tenant/frontend/blog/blog-single.blade.phpblog::tenant.frontend.blog.blog-single
Blog categoryviews/modules/blog/tenant/frontend/blog/blog-category.blade.phpblog::tenant.frontend.blog.blog-category
Blog searchviews/modules/blog/tenant/frontend/blog/blog-search.blade.phpblog::tenant.frontend.blog.blog-search
Note

ℹ️ ℹ How it works internally When a theme is activated, ThemeManager::registerModuleViewOverrides() scans themes/{slug}/views/modules/ and prepends each subdirectory to its matching module namespace using prependNamespace(). The finder cache is flushed so the change takes effect immediately.

Asset Pipeline

Theme assets are served as static files via a public symlink — no PHP involved on every request. This enables browser caching and CDN compatibility.

# Publish (symlink) your theme assets to public/
php artisan theme:publish mytheme

# Result:
# public/themes/mytheme/ → ../../themes/mytheme/assets/

In your theme.json, reference CSS and JS files by name (no path, no extension):

"headerHook": [{ "style": ["style", "pages"] }],
"footerHook": [{ "script": ["main"] }]

This loads public/themes/mytheme/css/style.css, pages.css, and main.js.

To reference assets inside a template, use the theme_asset() helper:

// In a blade template:
<img src="{{ theme_asset('img/logo.png') }}">
// Resolves to: /themes/mytheme/img/logo.png
// Falls back to: /themes/default/img/logo.png

Fallback Chain

View resolution follows a three-step fallback for the theme:: namespace:

  1. Active themethemes/{active-slug}/views/
  2. Default themethemes/default/views/
  3. Core tenant viewscore/resources/views/tenant/

This means your theme only needs to ship the files that are different. Everything else falls through to the default theme automatically.

Warning

💡 ✅ Ship only your overrides If your theme has a custom shop page but uses the default checkout, only create views/frontend/shop/all-products.blade.php. The checkout will fall through to the default theme automatically.

Still stuck?
Our support team is ready to help you get set up.
Get support