Doctrine And Twig Tutorial For Symfony2 and Twitter Bootstrap Video 2 (Twig Basics)

Tuesday, July 23, 2013

In this video we will be starting off from my login project to display a list of countries in the welcome page which is retrieved from a mySQL db. In this this video we will set up the twig and pagination


  1. Wilfo said... :

    After i login , a problem appears "variable countries doesn't exist"
    {%for country in countries %}

  1. Manoj S said... :

    Make sure the variable countries is passed as a variable while rendering the twig from the controller..the variable countires should have the list of countries in them...

  1. KH said... :

    add this code in welcome.html.twig and will work fine
    {% if countries is defined %}
    {% include "LoginLoginBundle:Default:table.html.twig"%}
    {% endif %}

Post a Comment

Symfony Symplifyd © 2011 | Designed by VPS Hosts , in collaboration with Call of Duty Modern Warfare 3 , Jason Aldean Tour and Sister Act Tickets