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   822 Views

Avatar
IOTI

Community Member, 189 Posts

26 April 2013 at 2:04am

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

Community Member, 123 Posts

29 April 2013 at 12:46am

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