I'm new to the Play framework (1.2) but I was wondering and hopefully I phrase this question correctly....I have a Play variable which stores which section ("_section") of a page the user is currently viewing. Is there any way to access that variable from a .js function?
UPDATE:
You can store objects for js as well from play:
<script type="text/javascript">
window.mytestarray = new Array();
</script>
#{list 0..links.size()-1, as:'i'}
{%
router = play.mvc.Router;
url = router.reverse(_section + '.' + links[i]).url;
%}
<script type="text/javascript">
window.mytestarray.push("${url}")
</script>
<li js_sub_nav_name="${ _section}" > <!-- MC class="#{if i == 0}first#{/if}"-->
<a href="${url}" class="${lines[i]}#{if _page == links[i]} active#{/if}">&{'header.nav.'+_section+'.'+links[i]+'.html'}</a>
</li>
#{/list}
</ul>
#{/if}