Home
Wiki
Home
Wiki
  1. 3. Reusables
  • 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
    • 6. FAQ
    • 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
      • Offer
      • ProductAttachments
      • ProductAttributes
      • ProductComparison
      • ProductDocumentation
      • ProductMixList
      • ProductsBlock
      • ProductsCarousel
      • ProductSingle
      • Profile
      • Quote
      • Register
      • RelatedProducts
      • SingleBlog
      • Stores
      • TextWithImage
      • ThankYouPage
      • TopBar
      • Wishlist
    • 3. Reusables
      • _Overview
      • Addresses
      • AddressForm
      • AnnouncementModal
      • BackToTop
      • BillingRetail
      • BlogPostingStructuredData
      • BrandListStructuredData
      • CollectionStructuredData
      • Company
      • General
      • Login
      • LoginModal
      • MonthlyTransactions
      • Offers
      • Orders
      • Payment
      • ProductAttachments
      • ProductAttributes
      • ProductComparisonButton
      • ProductComparisonFloatingButton
      • ProductGridItem
      • ProductGridItemClassic
      • ProductListItem
      • ProductModal
      • ProductStructuredData
      • ProfileInfo
      • PromptModal
      • Quotes
      • Register
      • Services
      • Shipping
      • ShoppingLists
      • ShoppingListsButton
      • ShoppingListsNavbar
      • StoresStructuredData
      • Toast
      • Transactions
      • Users
      • VariantContent
      • VariantContentClassic
      • WishlistButton
    • 4. Assets
      • Fonts
      • Images
      • Templates
      • Javascript
        • _Overview
        • theme.js
      • Css - Scss
        • _Overview
        • ThemeClasses
    • 5. SDK
      • _Overview
      • LiquidGlobals
      • ServicesSDK
  1. 3. Reusables

CollectionStructuredData

Purpose#

CollectionStructuredData emits Schema.org JSON-LD (CollectionPage wrapping an ItemList of Product) for a category/search/collection listing page, so search engines can produce category rich results and AI agents get the product set with item URLs.

Where it's rendered#

Rendered from Components/FilterList/Default.liquid:
{% render 'Reusables\CollectionStructuredData\Default', products: products, canonicalUrl: canonicalUrl, companyDomain: companyDomain, pageName: pageName, showPrices: showPrices, currencyCode: currencyCode %}

Inputs (Liquid render parameters)#

Named parameters:
products
The list of products currently shown on the listing page.
canonicalUrl
Used both for the page's url and to derive the site origin for absolute product URLs.
companyDomain
Fallback used to derive the site origin when canonicalUrl isn't available.
pageName
Listing page title, used as CollectionPage.name.
showPrices
Boolean; when false, per-item offers blocks are omitted.
currencyCode
ISO 4217 currency code (defaults to EUR when missing).

Model shape (storefront example)#

[
    {
        "title": "Sample product title",
        "link": "/product/sample",
        "sku": "Sample text",
        "mediaItems": [{ "link": "https://example.com/sample.jpg" }],
        "brand": { "name": "Sample brand" },
        "stockAvailability": { "label": "InStock" },
        "startPrice": 25,
        "productVariants": [{ "finalPrice": 25 }]
    }
]

Template behavior (Liquid + Alpine)#

Renders nothing when products is empty/missing.
Derives siteOrigin the same way as BrandListStructuredData (from canonicalUrl, falling back to companyDomain).
Builds each product's absolute URL from product.link: uses it as-is if it already contains ://, otherwise prefixes it with siteOrigin (handling both leading-slash and relative link shapes).
Resolves list price as product.startPrice, falling back to the first variant's finalPrice; offers is included only when showPrices is true and a price was resolved.
Availability per item comes from product.stockAvailability.label (OutOfStock → https://schema.org/OutOfStock, otherwise InStock).

Data contract (JS runtime)#

No client-side runtime state; all data is read directly from the Liquid render parameters at render time.

JavaScript#

File: Reusables/CollectionStructuredData/Default.js
Exposes: collectionstructureddatareusabledefault (currently an empty object)
The JSON-LD block is fully server-rendered; the global only reserves a unique name in the concatenated componentscripts.js bundle.

Global Alpine stores#

None. This reusable does not read or update any Alpine store.

Services / API calls#

None. All data (product list) is passed in as a render parameter; there are no client-side API calls.

Dependencies#

Liquid: Reusables/CollectionStructuredData/Default.liquid
JS: Reusables/CollectionStructuredData/Default.js
Translations: Reusables/CollectionStructuredData/Default.json

Notes#

The numberOfItems/itemListElement count reflects only the current page's products (i.e. the current page size), not the collection's total count.
Modified at 2026-07-24 07:43:37
Previous
BrandListStructuredData
Next
Company
Built with