How to transform a classic resource into a simple one ?
Hi, I have a some classic resources that I created at the start of my app, but I now realized they would be better has --simple resources. How can I transform them into exactly what the --simple flag create without having to recreat them ?
2 Replies
Removing the create/edit pages in the getPages() Methode should do the thing.
You need a few changes in your Pages\List-File. A Simple-Resource has an manage-file instead of an list file. Just change:
to
If you want change your Class- and filename from List to Manage. Then you need to change the Names in the getPages() Method too.
One more difference is in the Table Actions. Basically a simple resource has an DeleteAction in it.
Last thing is the getRelations()-Methode. A simple-resource hasnt this method. Remove it in your Resourcefile.
Ok thanks a lot π