How to get dust-js helpers working with krakenjs?

212 Views Asked by At

I am using krakenjs for my project which by default uses dust for templating.But I am unable to use dust-js helpers in my project.So,

               <td>{name}</td>

works fine but

            {@eq key=amount value="master"}
                You are no longer a Padawan.  
            {:else}
                You have much to learn, young Padawan  
            {/eq}

does not?

P.S.:There is a similar question but answer does not seem to help.Using dustjs-helpers with Kraken js

1

There are 1 best solutions below

0
On

By default KrakenJS does not include Dust.js helpers. You have to declare that you want to use them into your config.json. Find the section dedicated to dust in your config/confing.json and add "dustjs-helpers" entry to the helpers array. It should look like this if you have also dust-makara enabled:

"dust": {
    "helpers": [

        "dust-makara-helpers",
        "dustjs-helpers"


    ]
},