Content Management
See original GitHub issueIt would be great to be able to define a data structure for storing content, where pages would be a single representation instead of a collection.
The structure would be defined in a similar syntax to models:
keystone.set(‘content', {
home: {
title: String,
headerImage: Types.CloudinaryImage,
intro: { Types.Html, wysiwyg: true }
},
about: {
title: { type: String, default: 'About' },
content: { Types.Html, wysiwyg: true }
}
});
… then there would be an easy way to retrieve content for a particular page, something like this:
keystone.getContent(‘about’, callback);
Page content would be stored on a page-per-document basis, in a collection called app_content
.
Issue Analytics
- State:
- Created 10 years ago
- Comments:35 (14 by maintainers)
Top Results From Across the Web
What is content management (CM)? | Definition from TechTarget
Content management (CM) is the process for collection, delivery, retrieval, governance and overall management of information in any format.
Read more >Content management system - Wikipedia
A content management system (CMS) is computer software used to manage the creation and modification of digital content (content management).
Read more >What is a Content Management System (CMS) - Oracle
A content management system helps you create, manage, and publish content on the web. It also helps keep content organized and accessible so...
Read more >Chapter 1. What Content Management Is (and Isn't)
A content management system (CMS) is a software package that provides some level of automation for the tasks required to effectively manage content....
Read more >Content management system (CMS) - Optimizely
A content management system (CMS) is an application that is used to manage content, allowing multiple contributors to create, edit and publish. Content...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Based on @Mentioum solution, here is how we are handleling this at the moment : Disclaimer : this solution is not advanced/better, but the code example might help some people.
1 - We’ve duplicated Post.js model to create a Page.js model
2- created a dropdown with templates
template: { type: Types.Select, options: 'page, about, team, contact, portfolio', default: 'page'},
3- display someField if the selected template is ‘about’
someField: { type: String, dependsOn: { template: 'about' } },
and it works 😃
Now, I’d like to have an OR operator in
dependsOn: { template: 'about' }
, so that I can do something likedependsOn: { template: 'about' OR 'legal' }
ordependsOn: { template: 'about || legal' }
Any idea on how to make this happen ?
Thanks !
Full code example for Page.js here : https://gist.github.com/charleslouis/ff5cc15ce7d2f3aee59d
We’re closing all feature requests to keep the issue tracker unpolluted. From now on submit feature requests on productpains.com!