Cromwell
Cromwell copied to clipboard
Remove/ hide the shop details from admin panel
Hi all and congratz for this amazing CMS!!!
Is there a way to temporarily remove or hide the shop option from the admin panel? Lets say that i would like to build just a simple app page with a blog or a small social network, therefore shop section will not be needed in this scenario and will cause confusing if multiple admins are going to have access to the admin panel.
i think this can be achieve with a condition on the admin panel like enable or disable shop feature. if the feature is disabled then all the options regarding the shop should be hidden/ not displayed on the admin panel and frontend. Or it can be removed from the core and added as a plugin.
PR #193 introduces a modules configuration for the cms
though it's just going to hide the features, the API is still providing functionality
@faierbol I'm sorry for delay.
For now you can create a new plugin project with the code in the admin part :
import { registerSidebarLinkModifier } from '@cromwell/admin-panel';
registerSidebarLinkModifier('my-plugin-name', (links) => {
return links.filter(link => {
if (link.title === 'Store') return false;
return true;
})
})
Soon it'll be possible via settings PR #193 or via permissions PR #194
@playrich Actually I was thinking about this case several times in past. I was about to extend setup (welcome) admin panel page with two checkboxes/sliders:
- Store
- Blog
So basically a user will be able to pick a kind of website. After such setup I can disable related API.
Well, it also will be possible to disable API on changes in your modules configuration. It'll require server restart
Hi all, thx for your answers :) Looking forward to test the functionality when this features will be released.