question of templating logic
-
@xidui said in question of templating logic:
specific number is exactly 99
that does not sound complicated
-
@pichalite
seems the following does not work<!-- IF some_var == 99 --> <div></div> <!-- ENDIF some_var == 99 -->
I made a work around:
<div id="hello"> </div> <script> if ({some_var} != 99) { $('#hello').hide(); } </script>
But I don't like this work around. Since it is javascript that controls the templating thing, not the template engine itself.
-
@xidui it's not straight forward... you will have to use helpers.
see here... https://github.com/psychobunny/templates.js#helpers
Copyright © 2024 NodeBB | Contributors