is there any tool to convert html to twig?

artlara

New Member
I am learning Symfony2, and I am making small tests.Well I have made a small html for to test the twig templates.\[code\]<html> <head> <title>test00</title> <link rel="stylesheet" href="http://stackoverflow.com/questions/14087411/test.css" /></head><body> <div id="test"> <img src="http://stackoverflow.com/questions/14087411/test.png" /><br /> <a href="http://stackoverflow.com/questions/14087411/test.php">test</a> </div></body>\[/code\]And the files are in the same directory of html.Then copy all files (html, css and the images) to my test:/var/www/Symfony/src/Test/TestBundle/Resources/views/DefaultAnd rename the html to html.twig.But fail when use this html as twig template, because the Symphony try to use "http://localhost/Symfony/web/test.png" as link the image.And yes, I have read the documentation and know the "asset" and I can change the path to the files with some exampletest.png')" /> and also copy all files to the web directory in the budle.But I wonder "Is there any tool to convert html to twig?" because for example I can't say to my boss:"The Symfony2 is great. But your designer must to learn Twig and when she finish the html with dreamweaver, she must change all of links to css and images for to make a template...and yes she can't see anything only can send to me to put in the web server to check if it is correct."What do you hope that my boss will think about Symfony2? He will think this is crazy, this is twice of work.I think the best it is a automatic tool to translate a html with relative paths to twig and something like that a package files to put in web dir. And the designer does'nt need to know anything only make pretty htmls with few weird things as put {{page_name}} instead the "Page name".Regards.
 
Back
Top