Join Jon Peck for an in-depth discussion in this video Extending templates and decoration, part of Learning Symfony2 for PHP.
Twig takes a unique approach to templating.…In addition to sharing elements like a header…or footer, elements can be decorated…with a system of extending and overriding.…Frankly, it's really similar to object-oriented…inheritance, where children can selectively…pick and choose what to customize.…Parent templates are made up of html and blocks,…which define common elements.…A block is defined with a tag containing…the word block, then a unique name.…A block can have optional default content…
- Installing Symfony
- Creating a bundle from the console
- Customizing and generating database tables
- Generating controllers
- Creating, editing, and debugging entities
- Displaying and debugging a form
- Rendering content with templates
Skill Level Intermediate
Q: When trying to access the application, I receive an error stating "This script is only accessible from localhost." How can I get around this restriction?
A: The development front controller and configuration scripts are protected by default to only allow access from the localhost. Refer to the video titled “Exploring the Symfony layout” to see how to disable this security.