How to use multiple layout within a SailsJS app?

前端 未结 5 732
盖世英雄少女心
盖世英雄少女心 2021-02-15 13:16

My Sails.js application have separate frontend and admin layout. My view engine is ejs.

How do I use separate layouts for frontend

5条回答
  •  被撕碎了的回忆
    2021-02-15 14:04

    If you need to set view AND layout in your controller (Sails v0.11):

    res.view('auth/login', { layout: null } );
    

    Layout:

    null = None

    'folder/layout' = Your Layout

提交回复
热议问题