PJAX / XHR
daslicht opened this issue · comments
Marc Wensauer commented
Hello,
I like to return just the content without layout if a request is a XHR.
I tried it like this but it is not working:
- if(!xhr)
include "layout.blade"
block content
how would you solve this ?
Marc Wensauer commented
solved :
if(req.xhr) {
res.render('index.blade', {title: 'HOME XHR ' });
}else{
res.render('layout.blade', {title: 'HOME', page: 'index.blade' });
}