Add the ability for ContentItems in Collections to have attached assets. There will be two different types of assets:
linked
explicit
In a ContentItem, when an image is linked from either markdown or RST, it will automatically be added to our AssetManager; this is known as a "linked asset." At the moment, only images are supported to be linked assets.
Let's say we're writing a blog post about our trip to Italy. In our blog post, we'll be embedding thumbnails or shrunken-down versions of our original images. Our magic "linked assets" will catch the small versions but what if we want to attach the full resolution of the image to a ContentItem? This is where an explicit asset comes in. An explicit asset is one that is defined in the FrontMatter of a ContentItem via the now reserved assets keyword. How does this look?
---
title: My Trip to Italy
assets:
- leaning-tower-full.jpg
- colosseum-full.jpg
---
Check List
[ ] Added appropriate PhpDoc for modifications
[ ] Added unit test to ensure fix works as intended
Summary
Description
Add the ability for ContentItems in Collections to have attached assets. There will be two different types of assets:
In a ContentItem, when an image is linked from either markdown or RST, it will automatically be added to our
AssetManager
; this is known as a "linked asset." At the moment, only images are supported to be linked assets.Let's say we're writing a blog post about our trip to Italy. In our blog post, we'll be embedding thumbnails or shrunken-down versions of our original images. Our magic "linked assets" will catch the small versions but what if we want to attach the full resolution of the image to a ContentItem? This is where an explicit asset comes in. An explicit asset is one that is defined in the FrontMatter of a ContentItem via the now reserved
assets
keyword. How does this look?Check List