Creating a New Page

To create a new page :

  1. Open your code editor.
  2. Create a new file.
  3. Copy code from the Get Starter Kit Codes section at the bottom of the documentation.
  4. Arrange sections as desired between {# block mainContent #} and {# endblock #}.
  5. Save the file as page-name.twig in the src/twig/[theme-name]/ directory.
  6. The gulp command will automatically compile changes in page-name.twig to page-name.html in 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  #}