0

I have tried to add a new FormField to silverstripe 4 admin called "AdminButtonGroupField". But it gives me a error like this,

[User Warning] None of the following templates could be found: AdminButtonGroupField in themes "Array ( [0] => silverstripe/admin:cms-forms [1] => $default ) "

I have tried to put template different places but did not worked. Where is the exact place I can put this template?

Thanks.

kosala manojeewa
  • 329
  • 3
  • 11

1 Answers1

0

You can put your template in app/templates/AdminButtonGroupField.ss.

By putting templates in app/templates they will be available for the whole SilverStripe application to use, regardless of whether you're in the CMS or the frontend.

You could define an "admin theme" and enable it with LeftAndMain.admin_themes config if you don't want the template to be available to be used on the frontend. This probably isn't necessary for you.

Note that I've assumed here that AdminButtonGroupField has no namespace, and that you aren't customising its template name when you render the field. If you provide some (reproducible) sample code that would clear this up.

scrowler
  • 24,273
  • 9
  • 60
  • 92