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


Reply


3 Posts   574 Views

Avatar
t00thy

Community Member, 31 Posts

16 September 2011 at 11:20pm

Hi,

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.
FIRST
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.

SECOND
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.

Avatar
UncleCheese

Forum Moderator, 4096 Posts

17 September 2011 at 2:02am

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

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
t00thy

Community Member, 31 Posts

17 September 2011 at 2:14am

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