Creating a New Page
To create a new page :
- Open your code editor.
- Create a new file.
- Copy code from the Get Starter Kit Codes section at the bottom of the documentation.
- Arrange sections as desired between
{# block mainContent #}and{# endblock #}. - Save the file as
page-name.twigin thesrc/twig/[theme-name]/directory. - The
gulpcommand will automatically compile changes inpage-name.twigtopage-name.htmlin the root project directory.
In page-name.twig, you can change the page title, add new sections, or change section parameters as when you are modifying a page.
Get Starter Kit Codes
The following is a Starter Kit Codes that you can use to start a new page. You can copy the codes into your code editor application.
{# page-name.twig : Page template description #}
{# extends default layout #}
{% extends "../resources/layouts/default.twig" %}
{# set required variables #}
{% set headTitle = 'Page Title' %}
{% set pageClasses = 'page-theme-name page-name another-class-page' %}
{# end set required variables #}
{# block main content #}
{% block mainContent %}
{# include your sections code here #}
{% endblock %}
{# end block main content #}