Home
Wiki
Home
Wiki
  1. 1. Structure
  • Back to home
  • 1. Themes
  • Vs Code
    • Getting Started
  • Kitchenware
    • Layout
      • New Layout
      • Legacy Layout
    • Components
      • Announcement
      • Banner Carousel
      • Banner With Products Carousel
      • Blog Category List
      • Blog List
      • Brand List
      • Brands Carousel
      • Breadcrumb
      • Call To Action
      • Cart
      • Categories List
      • Change Password
      • Checkout
      • Cookie Manager
      • Filter list
      • Footer
      • Forgot Password
      • Form
      • Hero Carousel
      • Icon Block
      • Invitation
      • Last Visited Products
      • Layout
      • Login
      • Map
      • Nav Bar
      • Offer
      • Product Attachments
      • Product Attributes
      • Product Documentation
      • Product Expected
      • Product Modal
      • Products Block
      • Products Carousel
      • Product Single
      • Profile
      • Quote
      • Register
      • Related Products
      • Search
      • Stores
      • Subscribe Newsletter
      • Text with Image
      • Top Bar
      • Video
    • Reusables
      • Getting Started
    • Assets
      • Getting Started
    • SDK
      • Products
        • _findProductsByCategory
        • _findProductsByIds
        • _findProductsByTitle
        • _findProductsByFilter
        • _findProductsByCriteria
        • _findProductsAndCalculate
        • _findProductsThenCalculate
        • _getProductAttributeSet
        • _setLastVisited
      • Categories
        • _findCategoryTreeById
        • _findCategoriesByIds
        • _findCategoryByAlias
        • _findCategoryTreeByAlias
        • _getCategoryContent
      • Collections
        • _getCollectionContent
        • _findCollectionsByIds
        • _findCollectionsByIdsThenCalculate
      • Brands
        • _getBrandContent
        • _findBrandsByIds
      • Cart
        • _addToCartMulti
        • _addToCart
        • _setCart
        • _clearCart
        • _setCartListener
        • _removeFromCart
        • _calculateCart
      • Checkout
        • _startCheckout
        • _updateCheckout
        • _completeCheckout
      • Shopping Lists
        • _getShoppingLists
        • _updateShoppingList
        • _createShoppingList
        • _deleteShoppingList
        • _getShoppingListByAlias
      • Navigation
        • _getFooterMenu
        • _getHeaderMenu
      • Users
        • _getUserById
      • Utils
        • _calculateCurrency
        • _getCurrencySymbol
        • _getCulture
        • _subscribeToNewsletter
        • _findUnitsByIds
  • Noir
    • 0. Introduction
    • 1. Structure
      • Overview
      • LayoutA.liquid
      • ComponentsList.liquid
      • Metas.liquid
      • CssVariables.liquid
      • Json.liquid
      • GoogleTagManager.liquid
      • StagingButton.liquid
    • 2. Components
      • Overview
      • Announcement
      • BannerCarousel
      • BlogCategoryList
      • BlogList
      • BrandList
      • Breadcrumb
      • Cart
      • CategoriesList
      • ChangePassword
      • Checkout
      • CookieManager
      • FilterList
      • Footer
      • ForgotPassword
      • Form
      • IconBlock
      • Invitation
      • LastVisitedProducts
      • Login
      • Map
      • NavBar
      • ProductAttachments
      • ProductAttributes
      • ProductComparison
      • ProductDocumentation
      • ProductMixList
      • ProductsBlock
      • ProductsCarousel
      • ProductSingle
      • Profile
      • Register
      • RelatedProducts
      • SingleBlog
      • Stores
      • TextWithImage
      • ThankYouPage
      • TopBar
      • Wishlist
    • 3. Reusables
      • Overview
      • Addresses
      • BillingRetail
      • AddressForm
      • AnnouncementModal
      • BackToTop
      • Company
      • General
      • Login
      • LoginModal
      • Orders
      • Payment
      • ProductAttachments
      • ProductAttributes
      • ProductComparisonButton
      • ProductComparisonFloatingButton
      • ProductGridItem
      • ProductListItem
      • ShoppingListsButton
      • ProductModal
      • ProfileInfo
      • PromptModal
      • Register
      • Shipping
      • ShoppingLists
      • ShoppingListsNavbar
      • Toast
      • Users
      • VariantContent
      • WishlistButton
      • Services
    • 4. Assets
      • Fonts
      • Images
      • Templates
      • Javascript
        • Overview
        • theme.js
      • Css / Scss
        • Overview
        • ThemeClasses
    • 5. SDK
      • Overview
      • LiquidGlobals
      • ServicesSDK
  1. 1. Structure

ComponentsList.liquid

Purpose#

ComponentsList.liquid is the section renderer of the Noir theme.
It receives a list of component models (e.g. header/body/footer components) and renders each component by dynamically including the correct template file based on the component's Name and View.
This file is critical because it defines the include naming convention that all components must follow.

Where it's used#

ComponentsList.liquid is called by the main layout (Structure/LayoutA.liquid) to render:
Header components
Body components
Footer components
Example usage:
{% render 'Structure\\ComponentsList' with HeaderComponents as components %}

Inputs#

ComponentsList.liquid expects the caller to pass a variable named components, which is an array/list of component models.
Each item (commonly referenced as model) includes (at minimum) these fields:
model.Name (string)
The component type/name (e.g. Announcement, Cart, NavBar).
model.View (string)
The view variant (commonly Default).
The model may also contain other fields used by the component itself (e.g. model.Settings.*, model.Translations.*), but ComponentsList.liquid only needs Name and View to resolve the include.

Core logic (how the include name is built)#

For each component model, the template constructs an include name:
Components_<model.Name>_<model.View>
In Liquid, this is done with string concatenation:
{% assign componentTemplateName = 'Components_' | append: model.Name | append: '_' | append: model.View %}
{% include componentTemplateName with model %}

What gets included#

The resolved include name must exist as a component template.
Example:
If the model is:
model.Name = "Announcement"
model.View = "Default"
Then componentTemplateName becomes:
Components_Announcement_Default
…and the engine will include the corresponding component template.
Note
This convention means that component folders/views must match what the platform sends in model.Name and model.View.

Recommendations#

Template not found: If model.Name or model.View doesn't match an existing template include name, the component will not render.
Renaming folders is risky: Component naming is part of the rendering contract; avoid renaming component folders or views unless the platform model is also updated.
Default view: Most components use View = "Default". Ensure your templates follow the expected naming pattern.
Modified at 2026-04-14 13:18:56
Previous
LayoutA.liquid
Next
Metas.liquid
Built with