Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Request: Better documentation for how CMS works


Go to End


3 Posts   1761 Views

Avatar
wwwpanda

Community Member, 1 Post

7 January 2010 at 4:20pm

First of all, I think SilverStripe is a very good CMS with a flexible framework behind it. That' why I am eager to spend more time in this CMS. However...

I have been using SilverStripe for a while, and I have bought the Silverstripe book too. I have tried to read the tutorial for http://doc.silverstripe.org/doku.php?id=private:tutorial:creating-a-module&s=private%20tutorial%20modules, but none of them able to explain in a more generic way how we can implement a new function inside the CMS. I know I can read the source code of CMSMain as an example, but sometimes I don't need a tree of DataObject on the left side menu, I just need some generic simple links on the left side for accessing serveral forms on the right side content.

Below are some questions that I can't find the answers:

1) Exactly how the left side menu links works? How can I create 2 simple links so that when clicked, will show two simple forms on the right side?
2) After showing a form on the right side (using Form class), is there any way to show a response page instead of just showing a ajax status message? e.g. may be I want to do multi-page forms inside the CMS?
3) Any better documentation (or at least a brief intro) on how all those javascripts included by LeftAndMain.php used for? OK, I know what prototype/greybox does, but do I really need to dig into the js source of LeftAndMain*.js / behaviour.js etc. in order to understand how LeftAndMain work?

My point is, we need some better documentation for getting started on adding features on the CMS.

Thanks.

Avatar
solquent

Community Member, 1 Post

14 January 2010 at 2:21pm

I second that.

The online documentation covers much of the PHP code (although some docs are outdated). However, sometimes it is easier to go through PHP code in order to understand how to extend the CMS backend, until that code begins issuing ajax requests; things get mythical from there. There is a lot of javascript with very little documentation compared to its PHP counterpart. The framework is very permissive when it comes to the use of javascript libraries and their methods of communication with the backend; in which case trying to learn-by-example from the code gets more confusing.

It would be great if the collaboration between client-side and backend components could be illustrated more clearly (perhaps in a workflow diagram). Also, for an object-oriented framework, it would love to see it employ PHP interfaces as extension points.

Nevertheless, from the few days I spent playing with SilverStripe, I can tell it's got huge potential as a content management framework
thanks to the talented developers and active community behind it.

@wwwpanda
You might want to consider using the ModelAdmin.
http://doc.silverstripe.org/doku.php?id=modeladmin

Avatar
Ingo

Forum Moderator, 801 Posts

25 January 2010 at 12:09pm

In terms of extending the CMS behaviour and interface, we're hoping to make stuff easier with the 2.5 release. Much has already changed in trunk towards this goal, particularly an overhaul of most of the CMS JavaScript into a more extensible format based around jQuery.entwine and more encapsulation into components. Its still a complex piece of code, but should make extension a bit more straightforward.

You can read more about the upcoming changes on http://groups.google.com/group/silverstripe-dev/browse_thread/thread/500f6b53b7a7d99f/9c544b8ff54bca72?lnk=gst&q=javascript#9c544b8ff54bca72