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.

Customising the CMS /

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

setTemplateFileButtons usage


Go to End


2 Posts   1100 Views

Avatar
Werner

Community Member, 2 Posts

5 February 2013 at 4:18am

Hi there,

What would be the correct location of $PdfField->setTemplateFileButtons('MyUploadField_FileButtons');
The only way i can make this work is save my file to this path /framework/templates/includes/
When i try mysite or themes i get an error with no mention of the failed search path(s).

Regards Werner

Avatar
fabrizioT

Community Member, 2 Posts

20 February 2013 at 5:43am

It's a bit of a hack, but this worked for me:

$field->setTemplateFileButtons(__DIR__.'/../templates/Includes/UploadField_FileButtons.ss');

Regards.