Closed mani95lisa closed 10 years ago
I found it works fine in kraken 6.1, but not in 7.1, anybody have solution? Thanks!
I found that makara@0.3.4 wants dustjs-linkedin@^2.0.0, but kraken-js 0.7.1 dustjs is "~2.0.3". Maybe it's the problem, right?
I've just created a sample application with the latest generator (pulling in kraken-js 0.7.1 and makara 0.3.4) and was able to use the {@eq} helper per your instructions with no issue. I simply modified the default index.dust template as follows:
{>"layouts/master" /}
{<body}
<h1>{@pre type="content" key="greeting"/}</h1>
{@eq key=path value="home"}<p>ok</p>{/eq}
{/body}
and the model file index.js as follows:
'use strict';
module.exports = function IndexModel() {
return {
name: 'krakensample',
path: "home"
};
};
I can toggle "ok" on and off simply by changing the value of path, as you would expect.
I don't think this is due to the makara dustjs-linkedin dependency. Due to the more restrictive dustjs-linked in dependency in the generator generated sample app, I got dustjs-linkedin 2.0.3 installed.
I then updated dustjs-linkedin in package.json to match what is in makara (^2.0.0). I see the same correct behavior from the dust helper with dustjs-linkedin version 2.3.4 installed.
@grawk Thanks for your reply, I tried again in empy Kraken project.
You're right, I just install dust-helpers 1.2.0
in my working project, so it doesn't work, change it to 1.1.2, everything works fine.
Thanks!
I used
{@eq}
in my dust template, it works fine on it's test website : http://linkedin.github.io/dustjs/test/test.htmlBut didn't work in kraken. Could anybody tell me what's wrong with it?
data:
dust:
it could got
ok
on test website, but can't on my kraken application.Thanks for your help!