You should take advantage of live-binding, so it will automatically update to reflect changes in your app state. This means passing in arguments to the helper, and/or calling attr(). Putting your code in a jsfiddle could get you better help, but the gist of it is:
Your template:
- <div id="{{guid}}" class="panel-body {{#isCurrent guid}}active{{/isCurrent}}">
Your helper:
- ifCurrent: function(guid, options) {
- guid = can.Mustache.resolve(guid);
- if (can.route.attr('placeTypeGuid') == guid) {
- return options.fn();
- } else {
- return options.inverse()
- }
- }