wormalicious
New Member
I have my render function...\[code\]renderTracksList = function(tracks){ var source = $("#timeline-template").html(); var template = Handlebars.compile(source); var data = http://stackoverflow.com/questions/15751413/{ tracks: tracks, client_id: App.config.client_id }; var html = template(data); $('#timeline').html(html);}\[/code\]And in my template I'm trying to use print 'client_id' inside the loop, but in the loop context it's undefined, so how to access and print the variable?\[code\]{{#each tracks}}<div class="track"> {{title}} - <a href="javascript:App.play('{{permalink_url}}')">PLAY</a> {{#if downloadable}} - <a href="http://stackoverflow.com/questions/15751413/{{download_url}}?client_id={{client_id}}" target="_blank">DOWNLOAD</a> {{/if}}</div>{{/each}}\[/code\]Btw, I've already tried this...\[code\]<a href="http://stackoverflow.com/questions/15751413/{{download_url}}?client_id={{../client_id}}" target="_blank">DOWNLOAD</a>\[/code\]