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.

Blog Module /

Discuss the Blog Module.

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

Image in blog


Reply


621 Views

Avatar
bebabeba

Community Member, 193 Posts

24 April 2010 at 2:47am

hi!
I use Silverstripe 2.3.7 and blog v.0.3. My problem is add image.

First problem.
I change standard bcc editor in this way BlogEntry::allow_wysiwyg_editing('true');
When I add image in my blog entry and lokk in my daft site, I see html code and not my image. why?

Second problem.
Is possible to add image in this way?

class BlogEntry extends Page {
static $has_one = array(
   'Photo' => 'Image'
   );
function getCMSFields() {
      $fields = parent::getCMSFields();
      
      $fields->addFieldToTab("Root.Content.Images", new ImageField('Photo'));
      
      return $fields;
   }
I try my tab Images is empty. help..

Thanks!