Single page
Twlight provides the ability to create single pages
that show static content. Examples of that are the copy right page, terms and conditions, delivery information, shipping methods, and payment methods information pages. All of these topics are essential for the store owner, as he needs them to deliver specific information to the customers. This kind of information is rarely changed. For this reason, these pages are considered static.
Following is the page location and url:
└── src
├── views
├── pages
| ...
| ├── page-single.twig
...
...
Example
Variables
Components
This page starts by displaying the breadcrumbs
component. The {% component breadcrumbs %}
line returns the current naviation for the user.
{% component 'header.breadcrumbs'%}
The users' comments
on a specific page may be displayed using the component {% component 'comments' %}
.
{% component 'comments' %}
Usage
This page template receives the object page
which contains the details of the static content to be displayed. For example, the developer can use the variables page.title
and page.cotent
which are the core of this page template.
{{ page.title }}
{{ page.content|raw }}
The users' comments
on a specific page may be displayed using the component {% component 'comments' %}
.
{% component 'comments' %}