<script type="text/javascript">
    $(document).ready(function() {
        initTree({
            "selector": "#tree",
            "path": {
                "expanded":     [ "/cms" ],
                "preloaded":    [ "/cms" ],
            },
            "icon": {
                "document": "{{ asset('bundles/symfonycmftree/images/document.png') }}",
                "folder":   "{{ asset('bundles/symfonycmftree/images/folder.png') }}"
            },
            "route": {
                "create":   'admin_sandbox_main_editablestaticcontent_create',
                "edit":     'admin_sandbox_main_editablestaticcontent_edit',
                "erase":    'admin_sandbox_main_editablestaticcontent_delete'
            }
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function() {
        initTree({
            "selector": "#tree",
            "path": {
                "expanded":     [ "/cms" ],
                "preloaded":    [ "/cms" ],
            },
            "icon": {
                "document": "{{ asset('bundles/symfonycmftree/images/document.png') }}",
                "folder":   "{{ asset('bundles/symfonycmftree/images/folder.png') }}"
            },
            "route": {
                "edit":     'admin_sandbox_main_editablestaticcontent_edit',
                "erase":    'admin_sandbox_main_editablestaticcontent_delete'
            },
            "doctypes": {
                "blogpost": { 
                    "label": 'BlogPost', 
                    "action": function (node) {
                        window.location = Routing.generate('admin_sandbox_main_editablestaticcontent_create', { "type": "blogpost" })
                    }
                },
                "static": { 
                    "label": 'StaticContent', 
                    "action": function (node) {
                        window.location = Routing.generate('admin_sandbox_main_editablestaticcontent_create', { "type": "static" })
                    }
                }
            }
        });
    });
    
    
</script>
Document creation actions are now in a submenu and injected.
Document creation actions are now in a submenu and injected.
