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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

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

Images in blog posts


Go to End


2 Posts   2391 Views

Avatar
neros3

Community Member, 51 Posts

19 September 2013 at 4:26am

Hi

Does anyone ever wanted to allow users (with no access to CMS) to add images to a blog post?
I sure did tons of times, and always wondered why I couldn't.

Do you have a fancy solution for that?

Thank you!

Avatar
Bambii7

Community Member, 254 Posts

23 October 2013 at 1:42pm

For SS3

class BlogEntryDecorator extends DataExtension {
	
	public static $has_one = array(
		"Image" => "Image"
	);
	
	public function updateCMSFields(\FieldList $fields) {
		$fields->addFieldToTab( 'Root.Main', new UploadField('Image', 'Image'), 'Content' );
		return $fields;
	}
	
}