Questions tagged [client-side-templating]

101 questions
0
votes
1 answer

Client-side Handlebars causes 404 requests

I want to use handlebars on the client side. In my html code I have calls like: directly in my index.html. In javascript I do something like…
Chris
  • 2,296
  • 4
  • 27
  • 46
0
votes
2 answers

Javascript templating solution that allows after-rendering use of injected objects?

So, I'm building an application based on Backbone.js, by using templates for rendering some objects. It's working, however now I need to dynamically reference the objects at runtime, and I'm not sure it's possible with the templating solutions I've…
0
votes
2 answers

Client Side Rendering & SEO optimization

I want to understand why client side rendering makes it bad for SEO? Are there any articles about this? Isn't the data rendering already from the server and it's just a matter of making it look like anything we want in JavaScript, how will this…
Brittany Rutherford
  • 555
  • 1
  • 5
  • 15
0
votes
1 answer

Ember, wrap cols in rows with handlebars {{#each}}

I use handlebars {{#each}} I need to transform this:
{{somevalue}}
{{somevalue}}
{{somevalue}}
{{somevalue}}
Dallum
  • 21
  • 4
0
votes
1 answer

Uncaught TypeError: Cannot read property 'substr' of undefined Dustjs

I am trying to learn javascript templating, namely dustjs but I encountered problem which I think is so basic even google cannot answer it :) Here is code in it's simplest form
0
votes
2 answers

How do you register precompiled templates in Can.js

I'm using can.js and trying to precompile and load templates. I've taken my templates and precompiled them using can-compile and then loaded them in the resulting script file like so: (function(window) { can.Mustache('block_tpl.mustache',…
user1775718
  • 1,499
  • 2
  • 19
  • 32
0
votes
1 answer

Handlebars JS (or EJS) templating: Divide list into categories

I want to create an unordered list based on an array of objects using Handlebars JS. The objects take the following form: { name: 'NameOne', id: 001, category: 2 }, { name: 'NameTwo', id: 002, category: 1 }, { name: 'Name Three', id: 003, category:…
Jack Wild
  • 2,072
  • 6
  • 27
  • 39
0
votes
1 answer

jquery on click is not triggered when I directly access it by ID

I am using dust.js ( after much googling for a lack of good documentation ). Finally I was able to create a hyperlink dynamically.Now I want to give an onclick functionality to the dynamically generated hyperlink. function createLink(){ //…
Tito
  • 8,894
  • 12
  • 52
  • 86
0
votes
0 answers

Mustache templating without knowing JSON structure

I have json data like this FixedFields: { "DocType": { "fieldValueOnChange": "", "operatorStyle": "width:80%", "fieldType": "Fixed", "operatorOnChange": "selectFixedFieldType(this);", "contextpath": "/iTunes", "validations": { …
Katakam Nikhil
  • 1,375
  • 4
  • 14
  • 22
0
votes
2 answers

When to use a back-end templating engine and when to use a front-end templating engine?

Most traditional MVC frameworks include their own templating solution (Jinja2, Mako, etc). If one decides to use one of those new ui frameworks such as angular or backbone, they seem to encourage the use of front end templating solutions. Is there…
TheOne
  • 10,819
  • 20
  • 81
  • 119
0
votes
3 answers

Why should i use Handlbars Templates in BackboneJS application instead of underscore templates?

I have seen many people using handlebars templates with BackboneJS instead of underscore templates, even underscore is hard dependency of BackboneJS. Can anyone please tell me benefits of doing so?
Sandeep vashisth
  • 1,040
  • 7
  • 20
  • 40
0
votes
1 answer

Repeatedly Render Dust.js Template with New Data

What would be the best way to go about repeatedly rendering a dust template while having it advance in the data file its referencing rather than just repeat from the start each time. For example: Say I have a list of 100+ people stored as JSON in a…
dougmacklin
  • 2,560
  • 10
  • 42
  • 69
0
votes
0 answers

Javascript template engine with file load support

I need a client-side javascript template engine that supports loading partials from files. That's because I have a template with an unordered list. It has 2 types of list items (that means, for example, one li tag has a text input while another one…
0
votes
2 answers

Handbars.js template with top level array

I am having a hard time understanding how to deal with a top level array of dictionaries using handlebars.js with jQuery My data object does not consist of a dictionary with a named array object (which is what most of the examples online deal with).…
LJ Wilson
  • 14,445
  • 5
  • 38
  • 62
0
votes
1 answer

Javascript template parsing in mobile devices

I have implemented basic template parser for javascript. it simply replaces variables within template string. i.e {event.date} will be 7/4/2013 I am using script tag to store template string