Using KeystoneJS for managing pages

1,818 views
Skip to first unread message

Claus Jensen

unread,
Mar 23, 2014, 7:43:53 PM3/23/14
to keyst...@googlegroups.com
Hi,

I've been looking into KeystoneJS as a replacement CMS for a few projects I have. So far it seems pretty solid and I like how simple everything is.
I have just a few questions that I can't seem to figure out how to answer:

Taking the KeystoneJS demo site as an example, how would I go about having some of the texts/properties of (for example) the Contact page, manageable by the CMS backend? - I can't really seem to figure out what the solution to this would be. 

I would also like to be able to create 'pages' and optionally have them show up in the navigation. To me it seems like the state of the CMS is currently that to create new 'content pages' you would have to be a developer and specify a new route and a template for these pages. Am I really the only one who's had the need for this ... or am I just completely missing something?

Best regards,
Claus

Gregor Elke

unread,
Mar 24, 2014, 4:06:25 AM3/24/14
to keyst...@googlegroups.com
- how would I go about having some of the texts/properties of (for example) the Contact page, manageable by the CMS backend? -

you have to edit models in your editor.  Keystone is not a CMS but a CMfactory atm. you need to be a developer or at least have a few programming skills to use it.

- I would also like to be able to create 'pages' and optionally have them show up in the navigation.-

as far as i know, Jed and his ppl are working on that currently. https://github.com/JedWatson/keystone/issues/67

- Am I really the only one who's had the need for this -

No, there are others, me included, who want such a feature, since this is what a cms is about at the very end.

Claus Jensen

unread,
Mar 24, 2014, 9:12:59 AM3/24/14
to keyst...@googlegroups.com
Hey Gregor,

Thanks for your answers. I am a developer and it's not a problem for me to set up the models and do the groundwork with templates and everything. I would just like to be able to at some point, to hand over some responsibility of the content itself to my "users" (editors) who has no programming skills at all.

Is this group the primary discussion area for you guys or do you have somewhere else for discussing specific feature development like this? .. I would very much like to read your opinions and thoughts on the subject. I assume the work being done on it currently is going on in "/ lib / content / page.js" ? .. I saw some interesting stuff in there that kinda looked like it :)

j...@keystonejs.com

unread,
Mar 24, 2014, 9:47:05 AM3/24/14
to keyst...@googlegroups.com
Hi Claus,

This is really at the top of the list for upcoming features, and you're right, work is underway in /lib/content/page.js.

Discussions happen both here and on GitHub, with "developer / feature / bug" related discussion happening more there, and "support / how do I / are you going to..." more happening here.

To bring you up to speed:

Keystone currently manages lists of items - i.e. repeating content with a common structure.

We need to add the ability to also manage once-off content - i.e. content that happens once with a custom structure (e.g. home page content)

The plan is to let you define pages (or common content blocks) with Keystone Fields that you can then pull out and use like you would lists of content, e.g.

keystone.getContent('homepage', function(err, homepageContent) { /* ... */ })

The Admin UI would then render a special interface for managing this content, and probably store it all in a single mongo collection (e.g. app_content)

The current stuff in /lib/content is draft, we've been thinking on how best to solve it (right mix of simplicity and flexibility) so I'm keen to hear your thoughts.

In the meantime, you can also use the list options nocreate and nodelete to simulate page content - use an update script to add a few items with keys, have some generic fields heading / content / etc. and go from there. You can also make fields optional depending on another field's value (using the dependsOn option) - e.g. set up a 'template' select field that controls the visibility of other fields in the model.

Bit of a workaround, which is why I'm keen to get proper content management in, but it does work reasonably well. I know of a couple of projects that are set up this way.

Cheers,
Jed.

Gregor Elke

unread,
Mar 25, 2014, 5:28:14 AM3/25/14
to keyst...@googlegroups.com
Jed,

for our keystone app i implemented a rudimentary Page model with the ability to hold more or less generic content depending on a chosen template. The whole structure consists of 2 (and a half) models and a single Route handler. It is a very flexible approach to define a Page in the Admin UI and to link different Models to the page, so the template can just be rendered with it dynamicaly. The downside of the flexibility, is that the editor have to define queries an a search-engine-like query language, which contets she want to be on the page. I think this could be better with native support in Keystone.

Though it is a pure model approach (instead of type) may be you're interessted in the solution.


Reply all
Reply to author
Forward
0 new messages