Views - Libbna/CUSTOM-CMS GitHub Wiki

  • Twig is the template engine used in this project.
  • The template engine forms the 'View' part of the MVC model.
  • You can read about twig here

  • The view/templates directory stores all the templates used in the site.
  • In the view/templates directory =>
    • layout.html.twig - This file contains the layout or structure of the site. The layout view allows you to define a common site template, which can be inherited in multiple views to provide a consistent look and feel in multiple pages of an application.
    • contact.html.twig - This file displays all the user information from the database.
    • home.html.twig - This file contains a form using which user can insert his/her details.

  • Currently, we are working on rendering a single template hierarchy.
  • In which we will be rendering a single template and that template will have capability to nest other sub templates creating a whole template hierarchy.
  • Such kind of format can be found in Drupal CMS.