YoVDO

Templating with Twig Course (How To)

Offered By: Treehouse

Tags

PHP Courses Web Development Courses Inheritance Courses Control Structures Courses Twig Courses

Course Description

Overview

Templating languages and tools are used with frameworks like Slim and Laravel to incorporate PHP and logic into static HTML web pages. In this course we will see how to apply Object-Oriented methodology to views (web pages with HTML).

What you'll learn

  • Templating engines
  • Separation of concerns
  • Prepare a Twig template using variables and control structures
  • Inheritance in Twig

Syllabus

Templating Languages

Using a templating language for views, restricts the available logic, while providing a clean and simplified language that makes these templates more accessible for non-programmers as well. There are many options when choosing a template engine. This course will demonstrate the use of Twig, one of the most common template engines in PHP

Chevron 18 steps
  • What is a Template Engine?

    3:45

  • Installing Twig

    4:43

  • Twig View

    5 questions

  • Template Language

    4:28

  • Escaping and Comments

    3:53

  • Twig Syntax

    5 questions

  • The Structure of Control

    6:13

  • Working with Date

    3:17

  • Filters and Functions

    7 questions

  • Combining Templates

    7:09

  • Adding a Second Page

    3:23

  • Sharing

    6 questions

  • Custom Functions with Macros

    4:22

  • Importing and Using Macros

    3:28

  • Multiple Macros

    2:51

  • Custom Functions

    5 questions

  • Extending Twig and Beyond

    1:51

  • Your next step

    1 question


Related Courses

A Beginner's Guide to Java Programming
Packt via FutureLearn
Advanced Perspective of Classes and Object-Oriented Programming in Python
A Cloud Guru
Make an Action Bar in Unity Part 1 - Modular Action System
Coursera Project Network via Coursera
لغة البرمجة C++ لمبرمجي C، الجزء (ب)
University of California, Santa Cruz via Coursera
Programmazione I
University of Naples Federico II via edX