A page can contain a layout, and a layout can consist of multiple components. Each component can have its own content items.
A view can include a template and data. By binding data with the template, it generates an HTML fragment. Additionally, a view can also be a static HTML that acts as a reusable component for pages.
Here's an example of a simple view that reads blog data from a database and generates a blog list:
<script env="server"> var blogs = k.database.blog.all(); </script> <div k-for="item in blogs"> <h2 k-content="item.Title">Title</h2> <p k-content="item.Summary">Summary</p> <p><a href="/blogdetail">more</a></p> </div>
A layout is responsible for organizing the display of components within a page.
It defines the fundamental appearance and structure of the target page, including one or more placeholders where components can be inserted. The HTML code of the layout is rendered into the pages that utilize it, while the placeholder elements are rendered based on the page's settings.
When a page uses a layout, users can add components into the designated placeholder positions through the page settings.
ContentTypes define the field structure of content. They allow you to specify field names, control types, and data types for organizing and managing your content.
Content refers to the information that you want to display on your website. It can take various forms such as articles and products with images. Once you have created a content type, you can enter and manage your content within the related folder.