title: Scala + Play: how to pass a parameter into a route in a template?
body: <p>I'm tinkering with Scala and Play as a bit of a weekend learning exercise, and one thing that has got me a bit stymied with the templating system is how to pass parameters into routes. </p>
  
  <p>My template looks like this:</p>
  
  <pre><code> @(wallPosts : Array[models.WallPost], wallPostIndex: Integer)
  
   ...
  
   &lt;a href="@routes.Application.index(wallPostIndex = @wallPostIndex)"&gt;Next&lt;/a&gt;
  
   ...
  </code></pre>
  
  <p>I don't seem to be able to pass @wallPostIndex into the route in this href? How would I go about this? </p>
  
  <p>For reference, this is the route:</p>
  
  <pre><code>GET     /    controllers.Application.index(wallPostIndex: Int ?= 1)
  </code></pre>
  
  <p>Thanks for your help. </p>