Jump to:

10979 Posts in 2722 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » Uploadify import image removes image from other page

Discuss all other Modules here.

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

Page: 1 2
Go to End
Author Topic: 2315 Views
  • klikhier
    Avatar
    Community Member
    150 Posts

    Re: Uploadify import image removes image from other page Link to this post

    Actually, one final Q:

    Does it needs to be Pages or Page: (both seem to work)

    class Photo extends Image {

    static $belongs_many_many = array (
    'Pages' => 'Page'
    );

    }

    or

    class Photo extends Image {

    static $belongs_many_many = array (
    'Page' => 'Page'
    );

    }

  • UncleCheese
    Avatar
    4085 Posts

    Re: Uploadify import image removes image from other page Link to this post

    Yeah, the key in the array is an arbitrary name for the relationship, so it won't make a difference. The value 'Page' is important because it has to refer to a data class.

    To answer your question, though, as a matter of convention, it should be plural, since it returns a DataObjectSet.

    'Pages' => 'Page'

    2315 Views
Page: 1 2
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.