Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Each web page with a URL within a Plate site is a post, consisting of a post type and corresponding content fields. The post is the top level container for Plate’s frontend editor, which is loaded in with the tag content_for post, which in turn loads in the rest of the layout scaffold. Starting with:

...

Elements are pieces of inline content, ordered vertically within a column and also draggable by the user. Elements, just like Posts, have their own content type and corresponding content fields. With elements the user can fill his layout with needed content.

...

Plate will load a site starting with a theme layout filelayouts/theme.plate by default. This is the file that is the basis for every page, so a header, footer or html head tag that appears on every page should be placed here. At the location where {{ content_for_layout }}, is called, the page specific content will be loaded.

The page specific content is retrieved by calling the corresponding content for the requested post. This post content is templated separately for each post type like Pages and Blogposts. For each post type, an index.plate and a show.plate file is required. The index.plate template is used for the overview page of all the instances the post type, and the show.plate template is used for the detail page of a single instance of the post type. Learn more about theme files