Is it possible to access Play Framework scala contoller variables wihout passing to scala.html template?
For example my controller code as below,
def index = Action { request =>
val orgId = '12132132'
Ok(views.html.index(request))
}
My index.scala.html as below,
@(implicit request: RequestHeader)
@main("Test") {
I want to access controller "orgId" variable here wihtout passing here.
}
Here is my main.scala.html,
@(title: String)(content: Html)
<html lang="en">
<head>
<title>@title</title>
</head>
<body>
@content <!-- index.html placed here -->
</body>
<div>
Here I have bootstrap side menu and I want to display controller variable here without passing to main.scala.html templete.
</div>
</html>
Thanks.