23377 Posts in 18296 Topics by 2867 members
|Go to End|
20 December 2013 at 6:20am Last edited: 20 December 2013 6:21am
I have been having a few questions for quite a while, and i was wondering if anybody would be able to help me with them.
- I have "managed" to get a tree for one of my dataObjects after a lot of searching and trying stuff out i finally managed to get this done. Yet there are still a few things that keep bugging me about the implementation. So i have been wondering is there any "standard" way to create a CMS site tree in the same way you can with modeladmin for many dataobject gridfields. Like say i add the hierachy extension to one of my classes set the tree class and then it would instantly create a site tree with it. Instead of what i had to do now is look at the CMS site tree code and CMS assets code and copy much of it.
- In the CMS when a dataobject has a has_one relation with another dataobject a dropdown field is created. Is there any way to add a button next to this to say: "add new" that way a new one could be created more easily if you ask me. Without having to go to the page of that specific dataobject.
24 December 2013 at 12:20am
If you are talking SS2.4 then you can use...
see "AllowCreate" in https://github.com/ajshort/silverstripe-itemsetfield/blob/master/docs/en/index.md
I'm sure that ss.3.1 would allow creating one - but I've not come across the need yet - but please update this thread if you make a discovery
24 December 2013 at 5:06am
For 3.1, there's this module: https://github.com/sheadawson/silverstripe-quickaddnew
Not sure about the tree, I've never done it personally
2 January 2014 at 6:03am
Thank you swaiba and kinglozzer for your replies that solves one question still leaves me with the tree question. I cant imagine that there is not a straight forward no hackish feeling way to implement a tree just like gridfields can be easily created.
Still hoping somebody is able to provide me a answer to that question.
Also sorry for the late reply christmas/new year and all.
|Go to Top|