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.

Data Model Questions

Setting an upload to folder


Reply

9 Posts   2550 Views

Avatar
tsg

9 December 2009 at 7:12pm Community Member, 7 Posts

You would need to use $this->URLSegment within your class rather than just $URLSegment which you'd use in a template.

e.g.

$fields->addFieldToTab('Root.Content.Image', new ImageField('Image', 'Image', null, null, null, 'assets/News/' . $this->URLsegment));

cheers
tsg