Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Cant show FormattedCoverImage


3 Posts   527 Views


16 September 2011 at 11:20pm Community Member, 31 Posts


I have DOM+Uploadify+ImageGalery installed on my site. The gallery shows images propertly, but when i show alist of galleries, i can see the Cover Images. Or when i change delete <if CoverImage> in AlbumList, i can see some Cover Images.

So, I have two problems.
When I have code

<% if CoverImage %>
               <% control FormattedCoverImage %>
                  <img src="$CoverImage">
               <% end_control %>
            <% else %>
               <span class="no-image"></span>
            <% end_if %>

I can't see Cover Images. In the codeit give me no-image class. When I delete the requirement, i CAN see the CoverImage.

In some galleries i can set CoverImage. But in the others I set it, save it and when I refresh it, it show me no-CoverImage. I don't know if I make some mistakes, or if it's something wrong.


17 September 2011 at 2:02am 4085 Posts

FormattedCoverImage() returns an Image object, so you want $URL in that src attribute.

SilverStripe tips, tutorials, screencasts and more:


17 September 2011 at 2:14am Community Member, 31 Posts

Thanks, my mistake. Now I have correct CoverImage, so the SECOND problem i had=fixed. Now i work on repair the FIRST problem.