Ver Mensaje Individual
  #5 (permalink)  
Antiguo 14/10/2013, 05:29
ramondevesa
 
Fecha de Ingreso: noviembre-2010
Mensajes: 234
Antigüedad: 13 años, 6 meses
Puntos: 2
Respuesta: Variable no muestra su valor en Twig

No lo entiendo, lo tengo igual que tu pero a mi continua tirnadome un error:

Código PHP:
Ver original
  1. $em = $this->getDoctrine()->getEntityManager();
  2.        
  3.         $peliculas = $em->getRepository('VideoBundle:Video')->findAll();
  4.        
  5.         return $this->render('VideoBundle:Front:index.html.twig', array(
  6.             'peliculas' => $peliculas
  7.         ));

Y en Twig:

Código Twig:
Ver original
  1. {% if pelicula is peliculas %}
  2.                                     <article>
  3.                                         <a href="#" class="zoom pescash"><img src="{{ asset('bundles/front/images/caratulas/caratula1.png') }}" alt="thumbnail" /></a>
  4.                                         <h4>{{ pelicula.nombre }}</h4>
  5.                                     </article>
  6.                                                                         {% endif %}

Pero no entiendo lo que comentas en el último Post.

Saludos!