title: Playframework twirl (scala templates) guides
body: <p>Good day all</p>
  
  <p><em>note: Play! Framework newbie here.</em> </p>
  
  <p>I am trying to familairze myself using scala templates for a project, but cannot quite seem to get it right, nor do the examples found online always work correctly.</p>
  
  <p><strong>Problem:</strong></p>
  
  <p>I have to have searched for small solutions for a problem, and frequently encounter syntactical errors or the like.</p>
  
  <p>I decided to search for some comprehensive guide to building Scala templates used as views, but found only fragments and pieces of code that may help.</p>
  
  <p><strong>Documentation Provided:</strong></p>
  
  <ul>
  <li><a href="https://www.playframework.com/documentation/2.6.x/ScalaTemplates" rel="noreferrer">Play Scala Documentation</a></li>
  </ul>
  
  <p><strong>Play provided examples:</strong></p>
  
  <ul>
  <li><a href="https://playframework.com/download#examples" rel="noreferrer">Examples in Java and Scala</a></li>
  </ul>
  
  <p><strong>Variables:</strong></p>
  
  <ul>
  <li><p><a href="https://stackoverflow.com/questions/12031146/declare-variable-in-a-play2-scala-template">Declaring variables</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/13631861/scala-template-set-variable">Declaring Variable 2</a></p></li>
  </ul>
  
  <p><strong>Displaying Data:</strong></p>
  
  <ul>
  <li><p><a href="https://alvinalexander.com/scala/create-play-framework-template-functions-examples" rel="noreferrer">Displaying data using functions</a></p></li>
  <li><p><a href="https://groups.google.com/d/msg/play-framework/hEQ33y6_kSI/9pZ-RLRnRpsJ" rel="noreferrer">Display Items in alternating rows table with indicies</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/32081533/play-scala-template-block-statement-html-output-syntax-with-local-variable">Using blocks</a></p></li>
  <li><p><a href="https://gist.github.com/fancellu/8ff1f0f8ca2dc412892a84f71b8755be" rel="noreferrer">Displaying Block Scala variables in html</a> see the use of <code>{</code> and <code>}</code></p></li>
  </ul>
  
  <p><strong>Passing Data / Objects:</strong></p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/22832033/play-framework-2-how-to-pass-object-between-routes-views-and-controller">Passing objects between views and controllers</a></li>
  </ul>
  
  <p><strong>Further Reading:</strong></p>
  
  <ul>
  <li><a href="https://groups.google.com/forum/#!msg/play-framework/hEQ33y6_kSI/h9-AVxxS8bUJ" rel="noreferrer">Play Google Groups thread</a></li>
  </ul>
  
  <p><strong>Question:</strong></p>
  
  <p><em>note: I am asking this only since I have no idea how to proceed</em></p>
  
  <p>Is there any comprehensive guide for building Scala templates. Documented to such a degree as one would find for Play! Framework?</p>
  
  <p>TL;DR Where did <em>you</em> learn / discover how to create simple to complex Play! Scala templates?</p>