> For the complete documentation index, see [llms.txt](https://helpdesk.ldtsoft.work/ldt-digital-downloads/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdesk.ldtsoft.work/ldt-digital-downloads/navigation/how-to-add-blocks-in-the-theme-editor.md).

# How to add the app blocks in the theme editor

Put the Purchased Digital Content, My Digital Order List and Free or demo content blocks on your theme from the theme editor.

Show the app's content on your storefront: LDT Digital Downloads ships three theme blocks you add to a section in the theme editor like any other block.

### 1. Open the theme editor

In your Shopify admin go to **Online Store → Themes** and click **Customize** on the theme you are using.

![Theme editor with the Purchased Digital Content block in the section list and the Access Digital Content button in the preview](https://1863660695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iG7j4lDhziM0FqdCCU8%2Fuploads%2Fgit-blob-450715306781453f5fde64128f9de955c970bb75%2Ftheme-editor-add-block.png?alt=media)

### 2. Add the Purchased Digital Content block

On a **product** template, click **Add block** inside the section you want the button in, open **Apps** and pick **Purchased Digital Content**. It renders a button that takes a logged-in buyer to the files they bought.

![Theme editor with the Purchased Digital Content block in the product template section list](https://1863660695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iG7j4lDhziM0FqdCCU8%2Fuploads%2Fgit-blob-1efdbd350f2605fe85c54d8645b83cc588210aac%2Ftheme-editor-purchased-block.png?alt=media)

Its settings are:

* **Label** — the button text, **Access Digital Content** by default.
* **Alignment** — left, center or right.
* **Custom HTML Classes** — the button classes, **btn button button--primary** by default.
* **Message** — an optional rich-text note under the button, with its own alignment and classes.

### 3. Add the My Digital Order List block

**My Digital Order List** has no template restriction, so you can drop it into any page or section. It lists the orders that contain digital files for the signed-in customer.

* **Only visible to customers with purchased digital downloads** — hide the whole list from everyone else.
* **Table HTML Classes** — the classes on the table, **table** by default.

A common setup is a page called "My downloads" with this block in it, linked from your menu.

![Theme editor with the My Digital Order List block selected in the page template](https://1863660695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iG7j4lDhziM0FqdCCU8%2Fuploads%2Fgit-blob-6ad6faad28f592bd4e22f5dda9c3339bf5b4a335%2Ftheme-editor-orderlist-block.png?alt=media)

### 4. Add the Free or demo content block

On a **product** template add **Free or demo content**. It shows the files you marked as demo content on that product, to any visitor — see [How to offer free preview content](https://helpdesk.ldtsoft.work/ldt-digital-downloads/navigation/how-to-offer-free-preview-content.md).

![Free or demo content block selected in the theme editor](https://1863660695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iG7j4lDhziM0FqdCCU8%2Fuploads%2Fgit-blob-9992a200dc70e909efd71d12cd9c5f1d45395e8e%2Ftheme-free-content-block.png?alt=media)

It has the most settings of the three: **Heading** (**Sample content** by default), **Heading size**, **Description**, **Text when there is nothing free**, **Layout** and **Columns**, **Show folder names as group headings**, **Folders start collapsed**, **Items before "show all"**, the **"Show all" button label**, **Show file size**, **Show file type icons**, **Open video and documents**, and the colour, radius, spacing and padding controls.

### 5. Save

Click **Save** in the theme editor. The blocks appear on the storefront straight away.

![Theme editor with the Save button in the top bar](https://1863660695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iG7j4lDhziM0FqdCCU8%2Fuploads%2Fgit-blob-cadc6e78d698200779ce2493152a75b181887a30%2Ftheme-editor-save.png?alt=media)

### Result

Buyers see their files on the product page and in a list of their own, and visitors see whatever you published as demo content.

### Troubleshooting

* **The block is not in the Add block list.** App blocks are added inside a section, not at the top level of the template — click **Add block** within a section first.
* **The Purchased Digital Content button does not show.** It only appears for a signed-in customer who bought that product, and only on product templates.
* **The Free or demo content block is empty.** Nothing is published as demo content for that product yet.

### Related

* [How to offer free preview content](https://helpdesk.ldtsoft.work/ldt-digital-downloads/navigation/how-to-offer-free-preview-content.md) — in Navigation
