I have a problem trying to use layouts on Play! Framework As far as I know, the layout has a SINGLE #{doLayout /} tag, which indicates where all the code of the child view should be placed. This means that all the code in a specific view, for example, the Users list (list.html), is entered in the middle of the layout body. Now, I have found that some of my views require javascript, which is special for these views, so I would like to include script tags only in these views, and not on every view that inherits from the layout. The Razor viewer in ASP.NET MVC allows you to use different sections in a layout that are populated with a view that extends that layout, but I donβt know if Play supports something like this.
Do you see a solution to this problem?
source share