I have something like that on some pages. I basically define all that in the CMS
class MyPage extends Page {
public static $db = array(
'SideBar_Img_Comment' => 'Text'
);
public static $has_one = array(
'SideBar_Img' => 'Image',
'SideBar_Link' => 'SiteTree'
);
function getCMSFields(){
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.LeftHandSideBarContent", new FieldGroup(
new TreeDropdownField("SideBar_LinkID",
"<b>SideBar Image 1</b><br />Select the page to link to and then choose the image to display",
"SiteTree"),
new ImageField('SideBar_ImgID','')));
$fields->addFieldToTab("Root.Content.LeftHandSideBarContent", new TextField('SideBar_Img_Comment', "Image Caption"));
.
.
.
return $fields;
}
After which I just place $ShowCase1_Link_ID (and so on) in the template.
Is that any help?