couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From IOMATIX <ioma...@yahoo.com>
Subject Mustache Sections
Date Thu, 09 Dec 2010 03:12:33 GMT
Hi,

I am a couchdb newbie running CouchDB 1.0.1.

I have a very basic issue.  I cannot get Mustache Sections to render in a list. 
 Here is my list with the data hard coded from an example.

function(head, req) {
    start({
        "headers": {
            "Content-Type": "text/html"
        }
    });
var mustache = require("lib/mustache");
var view = {name: "Joe's shopping card",items: ["bananas", "apples"]};
var template = "{{name}}: <ul> {{#items}}<li>{{.}}</li>{{/items}} </ul>";
return mustache.to_html(template,view);

Outputs:
Joe's shopping card: <ul> <li></li><li></li></ul>

Please help!!!

Thank you,
/ Jeff


      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message