Theme files

Theme files are written in the Plate templating language. This language is HTML combined with a simple templating language. Any CSS or Javascript assets or frameworks can be used and included. By default, the Plate Grid framework is included.

Content Types

Theme Files for Content Types are structured as follows: :object_type_kind_name/:plural_name/:theme_file_name.:ext. In the case of Inline Layout components, like Elements and Sections, :theme_file_name usually is the singular name of the layout component or content type.

E.g., for Post TypesElement Types and Section Types:

posts/pages/show.plate posts/categories/show.plate elements/colored_buttons/colored_button.plate elements/paragraphs/paragraph.plate sections/page_sections/page_section.plate sections/background_sections/background_section.plate

Assets

Assets (CSS, JS) must always be placed in the assets folder in the root of your theme. After that you can nest folders as deep as you want. These paths are all valid:

assets/style.css assets/css/style.css assets/js/libs/my_js_lib.js

Includes

Includes are snippets of code that can be included in other theme files, with the include tag. Includes are useful to keep your code clean and prevent unnecessary code repetition. Unlike some other theme files, you are not limited to where to put includes, except the assets folder. However, we do encourage the usage of a includes folder in the root of your theme.

It is possible to prepend the file names with an underscore (_) to distinguish them from regular Content Type theme files. The following paths are all valid:

includes/my_include.plate /_some_include.plate elements/paragraphs/_some_include.plate theme/_some_other_include.plate

Public files

Sometimes it is necessary to put some static file on a site, like robots.txt. You can put these files in the folder public of the theme. These files will then be directly be accessible at the path relative to the folder public.

Note that these files will be rendered in plain text. It is not possible to put binary files here for download. The Plate Content Library has to be used to accomplish that goal.

Don't add public files with sensitive or domain-specific information in a public theme. Every site which will be created with that theme, will inherit these files.

Example:

If you have a file at public/robots.txt, this file will be available at "https://www.yoursite.com/robots.txt".

Emails

You can override some default emails that Plate sends out. Read more here.