Jump to:

7939 Posts in 1472 Topics by 944 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: 456 Views
  • t00thy
    Avatar
    Community Member
    31 Posts

    Cant show FormattedCoverImage Link to this post

    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.

  • UncleCheese
    Avatar
    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
    Avatar
    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.

    456 Views
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.