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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Limit Control Pain **SOLVED**


Reply

10 Posts   805 Views

Avatar
IOTI

26 April 2013 at 2:04am Community Member, 189 Posts

It's important to remember how your objects are related. In your GalleryImage.php class you're using "BelongToProduct" as the has_one relationship to a Product page. So try using:

$BelongToProduct.Link

Usually when i'm developing DataObjects i'll use Parent like so

static $has_one=array(
'Parent'=>'Product' //Product being whatever the "parent" is
);

Keeps things consistent.

Avatar
ambient

29 April 2013 at 12:46am Community Member, 123 Posts

Ah....Got it
Thanks so much for your help :)