Comments (6)
There is a better way to accomplish this. Example:
<ul class="nav">
<li{{#is title "Home"}} class="active"{{/is}}>
<a href="./index.html">Home</a>
</li>
<li{{#is title "Partials"}} class="active"{{/is}}>
<a href="./partials.html">Partials</a>
</li>
</ul>
from handlebars-helpers.
that works but it adds a false text for false values
<ul class="nav">
<li false>
<a href="./index.html">Home</a>
</li>
</ul>
from handlebars-helpers.
{{#is title "Home"}} class="active"{{else}}{{/is}}
from handlebars-helpers.
It doesnot work for me, I got this message Error: Missing helper: "is"
at Object. (C:\Users\UsuarioHP\AppData\Roaming\npm\nodeauth\node_modules\handlebars\dist\cjs\handlebars\helpers\helper-missing.js:19:13)
at Object.eval [as main] (eval at createFunctionContext (C:\Users\UsuarioHP\AppData\Roaming\npm\nodeauth\node_modules\handlebars\dist\cjs\handlebars\compiler\javascript-compiler.js:254:23), :6:66)
at main (C:\Users\UsuarioHP\AppData\Roaming\npm\nodeauth\node_modules\handlebars\dist\cjs\handlebars\runtime.js:175:32)
at ret (C:\Users\UsuarioHP\AppData\Roaming\npm\nodeauth\node_modules\handlebars\dist\cjs\handlebars\runtime.js:178:12)
at ret (C:\Users\UsuarioHP\AppData\Roaming\npm\nodeauth\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:526:21)
at ExpressHandlebars._renderTemplate (C:\Users\UsuarioHP\AppData\Roaming\npm\nodeauth\node_modules\express-handlebars\lib\express-handlebars.js:247:12)
at ExpressHandlebars. (C:\Users\UsuarioHP\AppData\Roaming\npm\nodeauth\node_modules\express-handlebars\lib\express-handlebars.js:173:21)
at
from handlebars-helpers.
This is my code and I get Cannot read property 'includeZero' of undefined
<ul class="nav navbar-nav"> <li{{#if title "Members"}} class="active" {{/if}}> <a class=""href="/">Members</a> </li> <li {{#if title "Register"}} class="active" {{/if}}><a href="/users/register">Register</a></li> <li {{#if title "Login"}} class="active" {{/if}}><a href="/users/login">Login</a></li> </ul>
from handlebars-helpers.
@Angelita31 if you have a bug with helpers from handlebars-helpers
, then please open a new issue for the bug. If you need help with Handlebars
, then you should ask questions on StackOverflow since more people will see it.
In either case, you should show more information... like how are you registering handlebars-helpers
with Handlebars
and how are you compiling and rendering your template?
from handlebars-helpers.
Related Issues (20)
- Comparation(#compare var1 "==" var2) with two variables doesn't work HOT 1
- Upgrade for new versions of the related plugins HOT 1
- does not export a 'register' function, cannot import HOT 1
- Create SECURITY.md
- Not splitting string by line breaks '\n' HOT 1
- todo: merge updates from https://github.com/Budibase/handlebars-helpers HOT 3
- Markdown Helper is broken...
- Vulnerability found (due to highlight.js) HOT 3
- isLast in nested forEach
- Titleize handlebar doesn't titleize input string correctly.
- Request: encode to hex HOT 1
- If loading all helpers the String helper reverse overrides the Array helper reverse. HOT 2
- An examples of working out averages on columns
- Handle empty fields
- String helper `split` doesn't split by empty string.
- This package does not install
- Fumanchu - A supported Handlebar + Handlebars-Helpers together! HOT 4
- query online
- Dead? Process to transfer ownership?
- Dependency "ent" uses deprecated Node punycode module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from handlebars-helpers.