Ucommerce
  • Ucommerce Next Gen
    • Getting Started
      • Prerequisites
      • Licensing
      • Ucommerce Templates
      • Headless Template
      • MVC Template
    • Headless
      • Postman Collection
      • Headless API Authentication
        • Token endpoint - Authorization Header
        • Authorization Scopes
        • Refreshing the Access Token
      • Reference
        • Cart
        • Cart / Order Line Items
        • Shipment
        • Billing
        • Promotion Codes
        • Price Groups
        • Payment Methods
        • Countries
        • Shipping Methods
        • Catalogs
        • Cart Custom Properties
        • Line Item Custom Properties
        • Orders
        • Views for Cart modifying operations
      • Custom Headless APIs
      • Error Handling
      • Pagination
      • Deprecation
    • Backoffice Authentication
      • Microsoft Entra ID Example
      • Auth0 Authentication Example
    • Definitions
      • What is a Definition
    • Search and indexing
      • Configuration
      • Indexing
        • Index Definitions
        • Facets
        • Indexing Prices
        • Suggestions
        • Custom Data
      • Searching
    • Payment Providers
      • Stripe Provider Integration
      • Implementing a custom payment provider
    • Data Import
    • Miscellaneous
      • Media
      • Price Group Inheritance
      • Price Group Criteria
      • Soft Deletion Of Entities
      • Logging
      • OpenTelemetry
    • Extensions
      • Extending Pipelines
        • Order Processing Pipelines
        • Checkout Pipelines
      • Changing Service Behavior
        • Images
        • Content
      • Custom Headless APIs
      • Extend the Backoffice
        • Custom UI Components
      • Custom Editor UI
      • Custom Promotion Criteria
      • Custom Price Group Criteria
    • How-To
      • Migrate from Classic
        • Common database issues
      • Entities from code
        • Bootstrapping data on startup
        • Product Definitions & Fields
      • Discover pipelines and their tasks
      • Executing a pipeline
    • Integrations
      • Umbraco Media Delivery API
      • App Slices
        • Product Picker
  • Release Notes
  • Contact Us
Powered by GitBook
On this page
  • Content
  • Related articles

Was this helpful?

  1. Ucommerce Next Gen
  2. Miscellaneous

Media

PreviousMiscellaneousNextPrice Group Inheritance

Last updated 5 months ago

Was this helpful?

All media used in Ucommerce is based on the Content data model. The model describes either a file, an image, or a folder.

Content

The Content class is a specialized model designed for Ucommerce, encompassing essential properties to represent images, files, or folders within the system. Key properties of the Content class include:

  • Id

    • Description: The Id property serves as a reference identifier utilized by Ucommerce. It should be configured to point to the corresponding data within your external image database.

  • NodeType

    • Description: The NodeType property defines whether the Content instance should be interpreted as an image, a file, or a folder. To facilitate this, you can refer to the predefined constant values within Constants.ImagePicker that align with these property distinctions.

  • ParentId

    • Description: The ParentId property plays a crucial role in establishing the folder hierarchy within the media picker. For example, an image should possess the ParentId value that corresponds to the folder it is contained within.

  • URL

    • Description: The URL used by the backoffice to render the given image.

  • ChildrenCount (Only applicable for folders)

    • Description: The number of children in the folder. If the content provider does not support a children count, leaving this property out will allow users to navigate to the folder.

The ChildrenCount property is important when working with folders. The Open Folder button will not appear in the media picker when the folder does not have children.

By implementing the Content class with attention to these properties, you can seamlessly manage and represent images, files, and folders within the Ucommerce system.

Related articles

Images
Example of folders with and without ChildrenCount set