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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Two questions about the CMS.


Go to End


4 Posts   842 Views

Avatar
Schippie

Community Member, 38 Posts

20 December 2013 at 6:20am

Edited: 20/12/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.

Avatar
swaiba

Forum Moderator, 1899 Posts

24 December 2013 at 12:20am

If you are talking SS2.4 then you can use...

https://github.com/ajshort/silverstripe-itemsetfield/

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 :)

Avatar
kinglozzer

Community Member, 187 Posts

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

Avatar
Schippie

Community Member, 38 Posts

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.