
- PHP
- Intermediate
About this Course
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
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
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
Teacher
-
Alena Holligan
After starting out in fine art and moving into graphic design, Alena found her passion for programming over 15 years ago and has never looked back. Alena enjoys community and is excited to introduce people to the wonderful world of PHP and the Portland Tech Community.
When not at her computer, Alena enjoys exploring Portland with her friends and family, including her 3 young children. She also enjoys the Symphony, Cooking, Books, Yarn and Yoga.