Replace split attachment code with PostMedia objects

This commit is contained in:
Hypolite Petovan 2023-09-28 21:32:36 -04:00
commit 4462ad6bf0
4 changed files with 127 additions and 212 deletions

View file

@ -1,5 +1,5 @@
{{if $image.preview}}
<a data-fancybox="{{$image.uri_id}}" href="{{$image.attachment.url}}"><img src="{{$image.preview}}" alt="{{$image.attachment.description}}" title="{{$image.attachment.description}}" loading="lazy"></a>
<a data-fancybox="{{$image.attachment->uriId}}" href="{{$image.attachment->url}}"><img src="{{$image.preview}}" alt="{{$image.attachment->description}}" title="{{$image.attachment->description}}" loading="lazy"></a>
{{else}}
<img src="{{$image.src}}" alt="{{$image.attachment.description}}" title="{{$image.attachment.description}}" loading="lazy">
<img src="{{$image.src}}" alt="{{$image.attachment->description}}" title="{{$image.attachment->description}}" loading="lazy">
{{/if}}