Ju99ernaut/grapesjs-template-manager

Is it possible to create predefined pages?

vizardkill opened this issue · 3 comments

Hello, first of all I love this project I would like to congratulate the team for bringing this plugin to Grapes.

What I would like to ask is, if it is possible to create default pages so that the user cannot delete them.

Let me explain, I have an ecommerce site and I have 4 default pages, Home, Cart, Product Page and Tracking, I don't want the user to delete those 4, but if I want him to be able to create more pages, is it possible?

At the moment it would be possible for the user to delete them, I'm not sure if the Pages API has such functionality but I guess from the UI side it's just a matter of hiding the delete button. You could exclude the pages from the editor then add them during the export/publish step.

Is there an example of how we could hide the delete button for those specific pages?

Haven't tried it yet, will look into adding it to the core