Skip to content

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
_cq_design_dialog [Download] Remove default action text (#626) Jun 19, 2019
_cq_dialog [Download] General Review (#616, #617) Jun 19, 2019
clientlibs Migrate unit test to aem mocks 2.7 (#708) Aug 30, 2019
.content.xml [Download] General Review (#616, #617) Jun 19, 2019
README.md [Embed] Create Embed Component (#718) Sep 19, 2019
_cq_editConfig.xml [Download] Create Download component Jun 11, 2019
download.html Migrate unit test to aem mocks 2.7 (#708) Aug 30, 2019

README.md

Download (v1)

Download component written in HTL that displays a downloadable asset on the page.

Features

  • Displays an asset on the page for download with the following elements:
    • Title
    • Description
    • File Size, File Format, Filename
    • Action
  • Optionally allows assets to be displayed inline in the browser rather than directly downloaded.
  • Direct upload from a local file system is configurable.
  • Download Servlet with support for conditional header information and Content-Disposition.
  • Style System support.

Use Object

The Download component uses the com.adobe.cq.wcm.core.components.models.Download Sling model as its Use-object.

Component Policy Configuration Properties

The following configuration properties are used:

  1. ./allowUpload - defines whether direct upload from a local file system is allowed.
  2. ./titleType - defines the HTML element to use for the download title.
  3. ./displaySize - defines whether the file size should be displayed.
  4. ./displayFormat - defines whether the file format should be displayed.
  5. ./displayFilename - defines whether the filename should be displayed.

Edit Dialog Properties

The following JCR properties are used:

  1. ./fileReference - defines the path to the asset from DAM.
  2. ./inline - defines whether the download item should be displayed inline in the browser vs. attachment.
  3. ./jcr:title - defines the download title.
  4. ./titleFromAsset - defines whether the title should be taken from the DAM asset title.
  5. ./jcr:description - defines the download description.
  6. ./descriptionFromAsset - defines whether the description should be taken from the DAM asset description.
  7. ./actionText - defines the action text.

BEM Description

BLOCK cmp-download
    ELEMENT cmp-download__title
    ELEMENT cmp-download__title-link
    ELEMENT cmp-download__description
    ELEMENT cmp-download__properties
    ELEMENT cmp-download__property
        MOD cmp-download__property--<property>
    ELEMENT cmp-download__property-label
    ELEMENT cmp-download__property-content
    ELEMENT cmp-download__action
    ELEMENT cmp-download__action-text

Information

If you were involved in the authoring of this component and are not credited above, please reach out to us on GitHub.

You can’t perform that action at this time.