SpinaCMS / Spina

Spina CMS
http://www.spinacms.com
Other
2.2k stars 406 forks source link

Allow a separation between pages and posts (for maintaining a blog for example) #26

Closed idl3 closed 9 years ago

idl3 commented 9 years ago

Add a separate page to manage posts management, possibly to add manage categories as well. addposts

Do you have any ideas how you would want to implement this? I can get to work on this immediately ;)

Bramjetten commented 9 years ago

I'd personally prefer to not include Posts management in the core of Spina CMS. I think it would be better to build it as a plugin. Can we perhaps build a better plugin structure?

idl3 commented 9 years ago

Agreed, I was just about to mention about managing custom-defined content as well. Maybe we can expose a way for us to include Models that exist in the parent rails app and Spina will know how to CRUD these objects.

Something like how ActiveAdmin does it?

Bramjetten commented 9 years ago

I prefer Refinery's way of actually generating new models that are namespaced in Spina. I think we shouldn't mix Spina with it's parent Rails app.

idl3 commented 9 years ago

Ah, alright will look into how refinery does it. Do you have any specific terminology you would like to use before I come up with some preliminary diagrams on how we can implement this?

idl3 commented 9 years ago

@Bramjetten any ideas on how we can go about creating the plugin structure? I see some plugins placeholders in the theme initializer file but if you point me in the right direction I can go read up or work something out.

Bramjetten commented 9 years ago

I actually created some plugins for our own projects. Try this one for example: http://restaurant.denkwebsite.nl/admin admin / admin

There's two (dutch) plugins below Media library. One is for managing reviews and the other is for saving opening times.

idl3 commented 9 years ago

Hmm cant seem to login :x haha

Bramjetten commented 9 years ago

Excuse me: mail@bramjetten.nl / admin

idl3 commented 9 years ago

Ahh that works, how do I go about implementing that? Any reference code I can see? I could write the documentation for that while I am at it too haha!

Bramjetten commented 9 years ago

https://github.com/denkGroot/spina-example-plugin

Bramjetten commented 9 years ago

That's the reviews plugin.

idl3 commented 9 years ago

Ah would it be possible to view the restaurant apps theme initializer? Or how we should include the plugin into a theme? Thanks!

Bramjetten commented 9 years ago

https://gist.github.com/Bramjetten/902c6328b0d1430ce236

idl3 commented 9 years ago

@Bramjetten thanks, got it to work! Couldn't seem to see the plugin menu on the dashboard page and realise it was a multiple theme bug :) Submitted a PR to fix that already!

Will write up a quick guide to the plugin system once I get my hands dirty with a few plugins!