Remember
the templates we've created? We placed them in the top level blocks
directory. Worked like a charm but imagine what happens when you create a theme which also needs some block templates in order to make sure the blocks look like the theme? You'd have to copy files into the blocks
directory as well as themes
. This is exactly what we're trying to avoid with packages.
It's rather easy with templates; they work almost anywhere. You just have to copy the folder slideshow
from blocks
to packages/c5book/blocks
, as shown in the following screenshot:
This step was even easier than most things we did before. We simply moved our templates into a different directory—nothing else.
concrete5 looks for custom templates in different places like:
concrete/blocks/<block-name>/templates
blocks/<block-name>/templates
packages/<package-name>/blocks/<block-name>/templates
It doesn't matter where you put your templates, concrete5 will find them.