How to create a layout for a custom module in Sugar 7?

Adding a new layout/view for a custom module in SugarCRM 7 and following the guide here: http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_7.1/20_UI_Mode...

But tweaked for a module instead of system-wide. When I repair and hit the desired URL (/#CoolModule/layout/setup) it is blank and I noticed that the layout/view is not being cached in /cache/modules/CoolModule like it does for other modules.

/modules/CoolModule/clients/base/layouts/setup/setup.php:
$viewdefs['CoolModule']['base']['layout']['setup'] = array(
    'type' => 'simple',
    //'span' => 12,
    'components' =>
    array(
        array(
            'view' => 'setup',
        ),
    ),
);
/modules/CoolModule/clients/base/views/setup/setup.js:
({
    className: 'setup tcenter',

    loadData: function (options) {
        this.render();
    }
})

/modules/CoolModule/clients/base/views/setup/setup.hbs:
<h1>My Setup View</h1>

do something!

Any help would be greatly appreciated!





Parents
  • Hi eggsurplus,

    Just a question on this custom layout "Setup" that you have created.

    Does the "Setup" view part of this layout also appear in Studio for changes ?

    I'm looking to create a custom layout+view where I can configure/customise the list of fields that should be available for some logic in the layout/view

    For that, I want this layout/view to be visible from Studio so I can modify the list of fields.

    Thanks!
    Kedar


Reply
  • Hi eggsurplus,

    Just a question on this custom layout "Setup" that you have created.

    Does the "Setup" view part of this layout also appear in Studio for changes ?

    I'm looking to create a custom layout+view where I can configure/customise the list of fields that should be available for some logic in the layout/view

    For that, I want this layout/view to be visible from Studio so I can modify the list of fields.

    Thanks!
    Kedar


Children
No Data