Open extensionsapp opened 8 years ago
Hello.
I use ExpressJS 4.
var config = {}; config.theme = 'MyTheme'; var express = require('express'); var path = require('path'); var app = express(); var cons = require('consolidate'); app.engine('tl', cons.dust); app.set('views', [ path.join(__dirname, 'themes', 'skeleton', 'views'), path.join(__dirname, 'themes', config.theme, 'views') ]); app.set('view engine', 'tl'); ...
themes/skeleton/views/index.tl
Hello {>"navigation"/}
themes/skeleton/views/navigation.tl
World
UPD:
Empty page, but if I change {>"/home/test.com/themes/skeleton/views/navigation.tl"/} normal echo Hello World.
{>"/home/test.com/themes/skeleton/views/navigation.tl"/}
Hello World
How to /home/test.com/themes/skeleton/views/navigation.tl change -> navigation.tl?
/home/test.com/themes/skeleton/views/navigation.tl
navigation.tl
It looks like a bug in the processing array views.
Add parameter { views: 'themes/skeleton/views/' } to consolidate options. This will fix the problem with dustjs.
Hello.
I use ExpressJS 4.
themes/skeleton/views/index.tl
themes/skeleton/views/navigation.tl
UPD:
Empty page, but if I change
{>"/home/test.com/themes/skeleton/views/navigation.tl"/}
normal echoHello World
.How to
/home/test.com/themes/skeleton/views/navigation.tl
change ->navigation.tl
?It looks like a bug in the processing array views.