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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

Upload via Content page

Go to End

2 Posts   1392 Views


Community Member, 36 Posts

29 September 2009 at 9:58am

I am trying to figure out a way for users to upload straight from the content page when they link. This way they don't have to switch tabs. I know other CMS systems use with the FCKeditor and TinyMCE. What would I need to do to get this in Silverstripe? Can it be done?

Also, if we have users set with LDAP and logged in, is there a way to script their user account straight to a folder in assets with their name on it?
(I am going to have lots and lots of users who will be using the subsites.)


Community Member, 131 Posts

30 September 2009 at 2:18pm

Edited: 30/09/2009 2:40pm


On the first one: TinyMCE comes bundled with SilverStripe (it's the actual editor you see in the backend).
If you would like to modify the functionality of TinyMCE these links might help:

If you need a separate upload-field, you can simply add it with:

$fields->addFieldsToTab("Root.Content.Main", array(
new ImageField("myImage","My Image Field")

This will add the field below the editor.

On the second one: I don't exactly know; I have no experience with this.
But after reading this article:
I guess you have to get the username from the member-table.
Next digg into onBeforeWrite to learn how to automatically create a folder with their name on it
Then you have to figure out a way to link all ImageFields/FileFields automatically to the folder of the logged in-user - you might have to extend FileField and/or it's subclasses for that.
Please look into UncleCheese's ImageGallery-module to get a clue about automatically creating and opening specific assets-folders.
Finally: post back to the forums to tell us what you did (or even better: write a recipe, post it here: and/or here: and of course tell us about your post on the forums)

I hope I provided some usefull hints ;-)