symfony - Disable formating in Twig -


Good day all! I am new to tweg, so my question may be stupid, but I already spent hours finding solutions to handle it. Therefore, in my tweype templates, the variable source comes in, in which some sources eg PHP, JS, HTML ... etc have been created - with Whitespace and / R / N, but the tweg rewards it all in one line I tried it forward:

  {% Autoescape false%} {{source}} {% endautoescape%}  

and

  {% autoescape false%} {{source | Raw}} {% endautoescape%}  

but not managed successfully Here is the output of {{dump (source)}}:

  string '$ Creator- & gt; Add ('availability', 'option', array ('option' = & gt; array ('morning' = & gt; 'morning', 'afternoon' = & gt; 'noon', 'evening' = & gt; 'Evening',), 'multi' => true,)); '(Length = 219)  

I would appreciate much for any help!

You try to present your page as HTML (or view) HTML all additional Strips white space (tabs, spaces, line feeds). To prevent your formatting from being spaced, you Tags:

  & lt; Pre & gt; {{Source | Raw}} & lt; / Pre & gt;  

Comments

Popular posts from this blog

mysql - How to enter php data into a html multiple select box -

java - Can't add JTree to JPanel of a JInternalFrame -

c++ - Cassandra datastax cpp driver - avoiding unnecessary copies -