I would like to create some List which is not displayed in Admin Panel.
Is there some already available option for that ? (I thought passing additional param to register method would be good)
I also have this requirement. I have some lists which will only ever be created/edited via the update scripts and I don't want any user editing them.
This should be pretty easy to do, we already have some options to control this.
Would you guys want the list completely blocked from the Admin UI?
At the moment you can turn off item creation, editing and deleting like this:
var MyList = new keystone.List({
noedit: true,
nocreate: true,
nodelete: true
});
... and if you don't specify the list path in the nav setting, it won't appear in the header nav.
We could go one further and specify hidden as a List option, which would stop the list showing up anywhere. _Maybe_, in the development env, you could still navigate to it by directly hitting the /keystone/list-path url, for debugging, but block this in production.
What do you think?
@brankosekulic The place I'd implement this would be in the options object passed to the List constructor, register is a good idea but the constructor already accepts similar options, because they need to be set before you add Fields to the List.
I agree, seeing List in development would be nice, but not necessary
I added this as an option to the list constructor:
var MyList = new keystone.List({
hidden: true
});
I realised you could easily set it to be visible or hidden in production mode by doing this:
var MyList = new keystone.List({
hidden: (keystone.get('env') == 'production')
});
Will hit npm with v0.2.3 soon.
Does this actually work under 4.0.0-beta.5 ? I have it set but the list still appears in the Admin UI. Wondering if it's me or a missing feature.
One gets an error if the User List is hidden - Is that intentional?
Same error for me and really need this hidden feature. When will the beta version be going to be GM? It's already 2018
I added this as an option to the list constructor:
var MyList = new keystone.List({ hidden: true });I realised you could easily set it to be visible or hidden in production mode by doing this:
var MyList = new keystone.List({ hidden: (keystone.get('env') == 'production') });Will hit npm with v0.2.3 soon.
it's not working in 4.0.0 still it appears in Admin UI
I am on lates V4.2.1. It's not working.
Throw the following error in the console.
throw new Error('Invalid Keystone Option (nav): list ' + i + ' is hidden.\n');
Any update on this field.
Most helpful comment
Does this actually work under 4.0.0-beta.5 ? I have it set but the list still appears in the Admin UI. Wondering if it's me or a missing feature.