Maybe I'm going down the wrong road, here, but I have a CTF that's used to edit extensions of Page, and i don't want those objects being displayed in the CMS Site Tree. Are there any flags I can put on the object so that they can only be edited through the CTF and not the full CMS interface?
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.
Try adding this your class:
static $can_create = false;
Okay.. that was my instinct.. but i wasn't sure if that would..
a) prevent it from being created in the table, as well.. and..
b) keep objects that have been created with the table from appearing in the site tree.
a) I'm pretty sure $can_create only applies to the CMS content editor.
b) What kind of objects are you creating? I assume the CTF only creates new objects of existing types (ie Class), so as long as you've set $can_create = false for those classes, you should be fine.
Do you mean that you want a flag to hide specific objects of the same type (eg, some pages, but not others) from the site tree?
Well, that would be ideal, yes. But given that $can_create is a static class var, I don't think that will work.