1776 Posts in 498 Topics by 533 members
Blog Module
SilverStripe Forums » Blog Module » Subclassing of BlogEntry doesnt work :(
Discuss the Blog Module.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1007 Views |
-
Subclassing of BlogEntry doesnt work :(

25 May 2009 at 8:52pm
hello,
im trying to put some new feautures to blogentry.
I created file PaliBlogEntry in mysite/code with this in it:<?php
/**
* Extends the BlogEntry page type
*/class PaliBlogEntry extends BlogEntry {
static $db = array(
);
static $has_one=array(
'Image' => 'Image'
);public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Main", new ImageField("Image"), "Content");
return $fields;
}
}
class PaliBlogEntry_Controller extends BlogEntry_Controller {
}
?>Than ...dev/build...
But it doesnt show image field
If i put it directly to blog/code/BlogEntry everything is OK... But i dont wanna touch the core.
Maybe im missing something easy here... but cant find what
Regards
pali
-
Re: Subclassing of BlogEntry doesnt work :(

26 May 2009 at 1:32am
oh, i see... it works, but i need to select "Pali Blog Entry" Pge Type in Behaviour Tab...
| 1007 Views | ||
|
Page:
1
|
Go to Top |

