bminer / node-blade

Blade - HTML Template Compiler, inspired by Jade & Haml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PJAX / XHR

daslicht opened this issue · comments

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 ?

solved :

if(req.xhr) {
        res.render('index.blade', {title: 'HOME XHR ' });
    }else{
        res.render('layout.blade', {title: 'HOME', page: 'index.blade' });
    }