Everything looks correct to me. I'll try it myself a little later today and let you know how I make out.
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.
- Previous 10 entries
- 1
- Page 22(current)
Ok, many thanks!
Seems the updateCMSFields() gets called when going to admin/assets/ and since it's trying to add a new textfield to a Root.Main tabset and it doesn't exist it breaks. Try this
public function updateCMSFields(FieldList $fields) {
if($fields->hasTabSet('Root.Main')){
$fields->addFieldToTab('Root.Main', new TextField('Description'));
}
}
HI IOTI, now it works like a charm. Something i will use over and over.
Combined witht the function that alows me to select an image folder for a typical page, it generates a list of images from a folder that i can easily place into a Jquery image gallery and have to variables to use: $Description and $Client.
Its like an image gallery module for SS3 without being one!
<% control ImagesIDE %> <!-- generates images from selected folder into the page's CMS panel -->
<!-- look for $Description and $Client as inserted into the FIles image panel -->
<img src="$URL" alt="{$Description}<br /><strong>{$Client}</strong>" title="" />
<% end_control %>
As seen here (view of the Image File panel)
Many thanks!
- Previous 10 entries
- 1
- Page 22(current)