AnsweredAssumed Answered

Is there a way to extend a layout without overriding it?

Question asked by Artis Plocins on Oct 9, 2018

Currently, Sugar Developer Guide tells us to replace the entire layout file by copying it into the custom directory and making a change, even if it's small like adding in one custom view.

 

Is there no way to extend layouts similarly to the way other parts of the system are extended?

For example, somehow access the layout data and insert the component:

$customComponent = ['view' => 'custom-view'];
$viewdefs['base']['layout']['record']['components'][0]['layout']['components'][] = $customComponent;

 

That would be very good for preventing customisations from overwriting view extensions and layout overrides because they want to add one more validation or a bit of record view code, for example.

Outcomes