August 2016
Intermediate to advanced
376 pages
6h 33m
English
Now we have the new theme almost ready.
We will now see how we can extend the core keystone.js and add another page on our blog, as the previous screenshot shows, we have an ABOUT menu item, so let's create it:
var keystone = require('keystone'); var Types = keystone.Field.Types; /** * About Model * ========== */ var About = new keystone.List('About', { // Using map to show title instead ObjectID on Admin Interface map: { name: 'title' }, autokey: { path: 'slug', from: 'title', unique: true }, }); About.add({ title: { type: String, initial: true, default: '', required: true }, description: { type: Types.Textarea } }); About.register(); ...Read now
Unlock full access