Recently I began working on some custom scripts to export workflows. I wanted to make this int a module loadable package so it’s easy to install and use. I was looking around to how to add the files to the admin without having to build a full on custom module since I just need one screen with some options. I was looking into how to extend the action_view_map.php file in the Administration module and I came across a bit of code that I figured would be useful to share.
In the custom directory you can build out a series of Extensions by adding files to specific folders. I found this to be useful when doing vardefs change, language files and laoudefs changes. What I didn’t know was that you can add the following and it will build them out as well:
- Create a new file in custom/Extensions/modules/Administration/Ext/ActionViewMap/.php
- Add the code in: <?php $action_view_map[‘action_name’] = ‘action_name’; ?>
- Run Repair and Rebuild
- Goto new action via direct link or a link from someplace.
I’m sure there are more that can be added and if you know of them please post them in the comments and I will update this post.