Join Jon Peck for an in-depth discussion in this video Accessing properties and methods from the template, part of Learning Symfony2 for PHP.
- [Voiceover] We've got a great starting place for…customizing our site using the Bootstrap framework.…Let's make some changes to the Issues Index View…template to take full advantage of it.…So under Resources, Views, Issue,…Index and we're back to our Index template.…Let's start by adding the class table to the table…so Bootstrap can style it.…So, Records List, Space, Table.…Now these headings are way too generic.…Let's simplify a bit and make it a bit more human.…
We don't need the internal ID,…but we do need the publication name.…So, let's just put it there.…Publication.…Next, let's combine the number and the date of publication…into one column, and we'll just refer to that as an Issue.…Cover and Actions can stay the same.…Now for the row contents.…Instead of the ID, let's get the name of the publication.…So we can just delete that,…and delete the hanging "A,"…and start a print tag.…We know that we're gonna get the entity,…so we can start there.…
And we also know that property name is just Publication.…And we know that publication has a name.…
- 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.