Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Cant show FormattedCoverImage

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 509 Views
  • t00thy
    Community Member
    31 Posts

    Cant show FormattedCoverImage Link to this post


    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.

  • UncleCheese
    4085 Posts

    Re: Cant show FormattedCoverImage Link to this post

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

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

  • t00thy
    Community Member
    31 Posts

    Re: Cant show FormattedCoverImage Link to this post

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

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.