Hello I have saved in the database, complete html codes, I need a controller to show the result of the code in a new page.
Hello I have saved in the database, complete html codes, I need a controller to show the result of the code in a new page.
You retrieve the content in the contractor in a variable as a text string:
$html=$em->getRepository('MyEntityRepository')->findOne();
Then you pass it as a parameter when you render the new page in the controller.
return $this->render('ruta a la pagina/nueva_pagina.html.twig',['html'=>$html]);
Then you render it on the page with twig.
<!DOCTYPE html>
<html>
<body>
{{ html }}
</body>
</html>