1.0.15 • Published 9 years ago

ejs-layout v1.0.15

Weekly downloads
21
License
Apache-2.0
Repository
gitlab
Last release
9 years ago

EJS

Embedded JavaScript templates

Build Status Developing Dependencies

Installation

$ npm install ejs-layout

var engine = require('ejs-layout');
app.set('view engine', 'ejs');
app.engine('ejs', engine.__express);

Features

- Extend from EJS
- Add : Layout for EJS

Layouts

  • views/layout.ejs
<body>
    <header>
        Welcome to EJS-Layout
    </header>
    <div id="page-main">
        <%+ yield('content') %>
    </div>
    <footer>
        <%+ yield('footer') %>
    </footer>
</body>
  • views/example.ejs
<%+ extend('layout') %>

<%+ section('content') %>

    <h3>This is content for example page</h3>

<%+ endSection %>

<%+ section('footer') %>
    
    <h3>This is footer for example page</h3>
    
<%+ endSection %>

License

Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)


EJS Embedded JavaScript templates copyright 2112 mde@fleegix.org.

1.0.15

9 years ago

1.0.14

9 years ago

1.0.13

9 years ago

1.0.12

9 years ago

1.0.11

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago