Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
{{ link('showcase/cover-image', $item) }}
<xf:if is="$item.cover_image_id && $xf.options.xaScCoverImageOnOverview">
<div class="scCoverImage">
<div class="scCoverImage-container">
<div class="scCoverImage-container-image js-coverImageContainerImage">
<img src="{{ link('showcase/cover-image', $item) }}" class="js-itemCoverImage" />
</div>
</div>
</div>
</xf:if>
<a class="image-link" style="background: url({{ link('showcase/cover-image', $item) }}) no-repeat center center transparent; background-size: cover;" href="{{ link('showcase', $item) }}"></a>
<xf:if is="$item.cover_image_id">
<xf:sidebar key="scCoverImageSidebar">
<div class="block">
<div class="block-container">
<div class="block-body block-row">
<div class="item-container-image js-itemContainerImage">
<img src="{{ link('showcase/cover-image', $item, {'d': $item.last_edit_date ?: null}) }}" class="js-itemImage" />
</div>
</div>
</div>
</div>
</xf:sidebar>
</xf:if>
Gotcha. And is that in the "xa_sc_index_macros" template? That's where I had made the changes. Wondering if I did it in the wrong place.You can't cut and paste the above example into the sidebar. Its designed (the CSS) for displaying above the item and has some very specific HEIGHT handling CSS for that area.
This is an example of how to do a proper sidebar block and how to display the cover image in that block. This will display the cover image in its exact dimensions (scaled down to fit the width of the sidebar).
HTML:<xf:if is="$item.cover_image_id"> <xf:sidebar key="scCoverImageSidebar"> <div class="block"> <div class="block-container"> <div class="block-body block-row"> <div class="item-container-image js-itemContainerImage"> <img src="{{ link('showcase/cover-image', $item, {'d': $item.last_edit_date ?: null}) }}" class="js-itemImage" /> </div> </div> </div> </div> </xf:sidebar> </xf:if>
No, the xa_sc_index_macro's contains various macros for use on Showcase INDEX PAGE and Showcase Category Pages (and in certain Widget Definitions for displaying featured content in main content areas).Gotcha. And is that in the "xa_sc_index_macros" template? That's where I had made the changes. Wondering if I did it in the wrong place.