Created
September 30, 2011 00:03
-
-
Save dethe/1252291 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Additional content section / block functions for body. | |
*/ | |
var rootpath = process.cwd() + '/', | |
path = require('path'), | |
calipso = require(path.join(rootpath, 'lib/calipso')); | |
exports = module.exports = function(req, options, callback) { | |
/** | |
* Get additional content for blocks in the template | |
*/ | |
calipso.lib.step( | |
function getContentList() { | |
var alias = options.getPageId.split('.')[0]; | |
options.getContentList({alias:alias}, {req:req}, this.parallel()); | |
}, | |
function done(err, contentlist) { | |
var content = contentlist.contents[0].toObject(); | |
callback(err,{ | |
project:content.content, | |
summary:content.summary, | |
equipment:content.equipment, | |
awards:content.awards | |
}); | |
} | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Clifton, maybe I'm not following this right. I've been testing the Calipso code base for two days now. First with the NPM package. Now with the source code using the devel branch. I forked it and cloned my fork making sure to switch to the devel branch and then running the
node app.js
from the source directory. Now I'm trying to figure out how to use these custom fields from the content type custom fields tab. I looked at this threadcliftonc/calipso#117
Maybe its all explained but I'm still not following. I took the gistfile1.txt and used it in the
themes/core/cleanslate/templates/home/body.js
restarted the server, created a content type home, then created content using type home and got this console error and server crash.
What I'm trying to figure out is if I can create a template with custom fields.