If I have A main page which composed from more than one section (header,main,side,etc..),each Is loaded from different URL say header Is composed from /head side section Is loaded from /side we used to use Include in other frameworks.how can I do this In play! 2.0
I used Jquery to do It but can’t this be done natively
$.get("/hello", function(result){
$("#xxx").html(result);
As said by Marcus, this is detailed in official documentation.
In fact, you do not paste together results from different URL. You define in your template which templates have to be used.
You can include other templates using :
But if you plan to have a global frame surrounding your pages, you should have a look to
extended template:Update :
if what you are trying to do is retrieve an absolute URL from a controller, you have to use the reverse routing: