None of the following templates could be found

Silverstripe Version: 4.2.1

Where exactly do I have to put my template files in order for them to get found?

There are some contradictory information out there and it seems there is no up-to-date documentation. I have to say that this is my first attempt using Version 4.2.1. I had an attempt with 4.0, but then had no time and now in version 4.2.1 everything seems to work differently again. The entire folder structure changed and I got lost.
Sorry, about this, but it is really frustrating when you spend one day to find out how to get your custom theme recognised and now I have difficulties to get my template getting found…

Apologies for my long description here, but now that my templates don’t work, I am not convinced that I really got this right with the theme…

What I have done regarding my theme:
This is my current folder structure:

Name: mytheme

- ‘$public’
- ‘SS4’
- ‘$default’
default_locale: ‘en_GB’

Layout (include SlideShow)

css (Symbolic link)
fonts (Symbolic link)
images (Symbolic link)
js (Symbolic link)
composer.json (as described in some other forum entry:
“type”: " silverstripe-recipe",
“extra”: {
“expose”: [

I did the dev/build, but I got the error message “None of the following templates could be found”. Btw. it all worked fine in SS3.6.

I tried to add the templates folder to the themes folder as in SS3.6 and entered text, so that I could make out which HomePage got recognised, but it was definitely not the one from the themes folder.

What do I have to do to get my templates recognised?

Any help is really very much appreciated!

Kind regards,

1 Like

I am having the same issue. Can’t find the way to accomplish this also.
I hope some body can guide us with an Answer.

I will keep checking, to see if I can find the solution.

I found this, not sure if this will help:

Template Inheritance

Theme types

Templates in SilverStripe are bundled into one of two groups:

  • Default Templates, such as those provided in mymodule/templates folder.
  • Theme templates, such as those provided in themes/mytheme/templates folders.

The default templates provide basic HTML formatting for elements such as Forms, Email, or RSS Feeds, and provide a generic base for web content to be built on.

Template types and locations

Typically all templates within one of the above locations will be nested in a folder deterministically through the fully qualified namespace of the underlying class, and an optional type specifier to segment template types. Basic template types include Layout and Includes , and a less commonly used Content type.

For instance, a class SilverStripe\Blog\BlogPage will have a default template of type Layout in the folder vendor/silverstripe/blog/templates/SilverStripe/Blog/Layout/ .

Note: The optional type , if specified, will require a nested folder at the end of the parent namespace ( SilverStripe\Blog ) to the class, but before the filename ( BlogPage ).

Templates not backed by any class can exist in any location, but must always be referred to in code by the full path (from the templates folder onwards).

Nested Layouts through $Layout type

SilverStripe has basic support for nested layouts through a fixed template variable named $Layout . It’s used for storing top level template information separate to individual page layouts.

When $Layout is found within a root template file (one in templates ), SilverStripe will attempt to fetch a child template from the templates/<namespace>/Layout/<class>.ss path, where <namespace> and <class> represent the class being rendered. It will do a full sweep of your modules, core and custom code as it would if it was looking for a new root template, as well as looking down the class hierarchy until it finds a template.

This is better illustrated with an example. Take for instance our website that has two page types Page and HomePage .

Our site looks mostly the same across both templates with just the main content in the middle changing. The header, footer and navigation will remain the same and we don’t want to replicate this work across more than one spot. The $Layout function allows us to define the child template area which can be overridden.



    <% include Header %>
    <% include Navigation %>


    <% include Footer %>


<p>You are on a $Title page</p>



<h1>This is the homepage!</h1>


If your classes have a namespace, the Layout folder will be found inside of the appropriate namespaced folder.

For example, the layout template for SilverStripe\Control\Controller will be found at templates/SilverStripe/Control/Layout/ .

Jose Ortiz
mejor epoca para viajar

Hey @Kimk,

The SilverStripe version 4 has directory structure be like this,

All model and controller file like HomePage.php and HomePageController.php put into app/src folder you can follow the screenshot.

then in the themes folder, you can create your theme suppose mytheme,

then in theme.yml file, you have to put your theme name like this follow the screenshot.


And in your theme folder (mytheme) you can add all css, js and ss files and you can add your custom templates files in mytheme/templates/Layout.

Lastly, do the flush your site using your-domain/dev/build?flush=all.

Hope this helps you…:slightly_smiling_face:


1 Like

It’s Work For me.

After rebuilding through /dev/build/flush=all, the same errors was there. And When I Reload : http://localhost/folder, It’s OK.

Hi addwebsolution,

Thank you for your quick relpy.
So, I followed your instructions and

  • deleted the templates folder from the app folder

  • and inserted it in the themes folder.

The theme already existed in theme.yml.

  • I did **your-domain/dev/build?flush=all

  • As I still had the ‘public’ in the theme.yml, I deleted this and did the dev/build?flush=all again,

but in both cases I ended up landing on the default ‘Home’-page - not the expected content and styling.

Comparing it with the simple theme, it is now set-up like this, but still doesn’t work…

What am I missing here?


Hi Kimk,

Page is working or getting server error?

Hi Kim,

SS4 requires templates to be in fully namespaced locations that match your page classes, so for example, if your HomePage class is actually App\Model\HomePage then the Template needs to be in the following directory structure:


That might be why templates are not found? If not, then could you post the full error you get (including any stack traces)?

Hi PsychoMo,

Thank you for your answer. After all this try and error I completely forgot about the namespace folder.
The namespaced location templates*app\namespace* didn’t work. I got the default content for the Homepage, not my Homepage specific content.

When I put my Includes and Layout in the following directory structure:

    Includes  (etc.)

then I get the error message (title of this question) regarding the SlideShow: None of the following templates could be found: Array ( [0] => Array ( [type] => Includes [0] => SlideShow ) [1] => SlideShow ) in themes "Array ( [0] => $public [1] => SS4 [2] => $default ) "

When I move the SlideShow to the templates/Includes folder, I get the HomePage with the content I expect.

Does that mean that I don’t need the Includes folder under mynamespace folder?

Thank you very much for the right hint, PsychoMo!

Did you work this out? I have the same issue that my includes such as don’t work in my namespace Includes folder but do work in the templates/Includes folder. My template works just fine in the namespace folder.
I find the documentation really confusing and everyone has a different idea of the best method.

Sorry, guys, I have to come back to this one…

This time only the Breadcrumbs are missing… although it is there and all the other files in the include folder work perfectly fine.

I upgraded to 4.3.3 and on my local (WAMP) everything works perfectly fine, but when I uploaded it to the host server I get the error above. The thing is, I uploaded another project recently which works perfectly fine. I developed it in the same way.
Can it be that one file is missing in SilverStripe (I FTP-uploaded, but that hasn’t been an issue with the other project)?
Not the ’ Breadcrumbs’ in the template which is the only I get the error message for. All other files in the include folder work fine.

Has anybody any idea?

Thank you very much.

Sometime it helps when you speak about things…

In this case it was simple. I had a typo in my <% include Breadcrumbs %> and the file name is BreadCrumbs.
That doesn’t explain why it is working on my WAMP (it seems to ignnore camelCase), but just in case somebody else has a similar stupid error, I post my error here :wink:

1 Like

Ignoring case may well be a Windows thing - Linux and other OS’s are a little more particular about case-sensitivity

Totally helps to talk about things. I think this is the second time I have done this silly camel case mistake and read this and got this reminder. vs - so easy to overlook, especially when everything is working on Wamp.

Thanks Kimk
It’s wonderful that you posted your solution in the forum!
The same stupid mistake happened to me. Incorrectly typed CamelCase works perfectly on localhost, but not on Unix servers. (I tried my themes paths for two hours :frowning: )