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
    • 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. 3. Reusables

ProductAttachments

Purpose#

The ProductAttachments reusable renders a simple list of product attachment links (typically PDFs) for a product, using the attachments passed in from a parent component.

Where it's rendered#

This reusable is rendered from:
Components/ProductAttachments/Default.liquid
{% render 'Reusables\\ProductAttachments\\Default', attachments: attachments %}
Components/ProductSingle/Default.liquid
{% render 'Reusables\\ProductAttachments\\Default', attachments: product.attachments %}

Inputs (Liquid render parameters)#

Named parameters:
attachments
The reusable expects attachments to be an array of attachment items.

Template behavior (Liquid + Alpine)#

The template iterates attachments and renders one row per item.
Each row contains:
an anchor that opens in a new tab (target="_blank")
an aria-label that includes Reusables.ProductAttachments.Translations.ViewAttachment plus the attachment alt
a PDF icon element (ic-pdf)
There is no Alpine wiring in this reusable (no x-data, no $store usage).

Data contract (JS runtime)#

This reusable is Liquid-only, but it has a strict runtime data contract for each attachment item.

Model shape (storefront example)#

Example (from a real ProductAttachments model dump) keeping only the relevant fields for this reusable:
{
  "attachments": [
    {
      "alt": "Sample text",
      "link": "https://example.com/sample",
      "title": "Sample text",
      "icon": {
        "link": "#"
      }
    },
    ...
  ]
}

attachments[] item fields (as consumed by Liquid)#

link
Used as the anchor href.
title
Rendered as the anchor text.
alt
Used in the anchor aria-label.
Optional fields (present in sample data but not used by the current template):
icon.link
Present in the backend payload but not rendered by Reusables/ProductAttachments/Default.liquid.
If any of these are missing, the rendered output may be incomplete (e.g. empty link text or an aria-label without the attachment description).

JavaScript#

Global object#

Global object: productattachmentsreusabledefault
Notes:
It is currently an empty object ({}) and is not referenced by the Liquid template.
If JS behavior is added later, prefer a factory pattern only if Liquid parameters are required.

Dependencies#

Liquid: Reusables/ProductAttachments/Default.liquid
Translations: Reusables/ProductAttachments/Default.json
Icons/style: uses the ic-pdf icon class (provided by the theme icon font).

Notes#

The parent component(s) are responsible for deciding when to render attachments and for passing the attachments array.
Translation usage in this reusable is limited to the aria-label prefix (ViewAttachment).
Modified at 2026-04-14 13:18:56
Previous
Payment
Next
ProductAttributes
Built with