Closed Pondio closed 7 years ago
I have a series of images saved in a folder of the bundle that I am using, and those routes are stored in Database I consult through the driver the route of the chosen product and I pass by parameter the variable that contains the route of the image and When I try to put that variable inside so that the path is loaded it gives me the following error Unexpected token "name" of value "greeting" in @UserBundleIyD \ Default \ product.html.twig at line 322. I do not know how to do to solve the error. Attach the driver code and the twig code.
ProductoController:
// FOTOS PRODUCTOS
$name = "Fotos Productos";
$prodID = $producto[0]['prodid'];
$sql = "Select imagenproducto from jarvis.sch_mrp_tbdata_proddocs where prodID = '$prodID'";
$sth = $funciones->consultaBD($sql,"fsql001");
$result = $sth->fetch_all();
//print_r($result);
$imagenproducto = $result[0][0];
$imagenFOTPROD = $imagenproducto;
return $this->render('@UserBundleIyD/Default/producto.html.twig', array ('linea_list'=> $linea_list,
'accionTer_list'=> $accionTer_list,'formafarma_list'=> $formafarma_list,
'estado_producto_list' => $estado_producto_list,'producto'=>$producto,'bodegas'=>$table,
'DM' => $DM,'DD' => $Dd,'SS' => $SS,'PP' => $PP,'LE' => $LE,'table_pronostico' => $table_pronostico,
'DMto' => $DMto,'DDto' => $Ddto,'SSto' => $SSto,'PPto' => $PPto,'LEto' => $LEto,'imagenFOTPROD' => $imagenFOTPROD));
Twig
{% image imagenFOTPROD %}
<img src="{{ asset_url }}" width="400px"/>
{% endimage %}
Hi @Pondio!
This bundle doesn't provide or modify anything related to this {% image %}
tag. This is functionality from Assetic - so we can't help here.
Cheers!
Please consider adding a more detailed issue. For now we cannot help you if we don't understand what the problem you encounter.