3375 Posts in 999 Topics by 712 members
|Go to End|
30 April 2013 at 1:50am Last edited: 30 April 2013 1:56am
I have an image gallery and I would like to set for each uploaded image a default path value, which should be similar to the breadcrumbs. My code it's here, so my question is what should I write to 'Path' => '', so that in my database would be saved the breadcrumbs ?
For example if my gallery is located on this url: 'http://localhost/prosteel/projektgalerie/projekt-2/', than I would like to set the default value 'Projektgalerie Projekt 2'. I hope you can help me.
class ImageResource extends DataObject
static $db = array (
'Path' => 'Text',
'Caption' => 'Text'
static $has_one = array (
'Attachment' => 'Image', //Needs to be an image
'Projects' => 'Projects'
static $defaults = array(
'Path' => ''
public function getCMSFields_forPopup()
return new FieldSet(
|Go to Top|