Created
March 25, 2015 15:45
-
-
Save mmarum-sugarcrm/6e38261a534854137ba6 to your computer and use it in GitHub Desktop.
Using Name and Type in View Definitions in Sugar 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$viewdefs['base']['layout']['foo'] = array( | |
'components' => array( | |
array( | |
'layout' => 'header', //reference another definition | |
), | |
array( | |
'layout' => array( //directly include definition | |
'components' => array( | |
array( | |
'view' => 'title', //reference another definition | |
), | |
array( | |
'view' => 'content', //reference another definition | |
), | |
), | |
'type' => 'base', | |
'name' => 'my-custom-main', | |
), | |
), | |
), | |
'type' => 'foo', | |
'name' => 'my-custom-page' | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$viewdefs['base']['view']['foo'] = array( | |
'buttons' => array( //directly include definition | |
array( | |
'type' => 'button', | |
'name' => 'cancel', | |
), | |
array( | |
'type' => 'button', | |
'name' => 'save', | |
), | |
), | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$viewdefs['base']['layout']['foo'] = array( | |
'components' => array(), | |
'type' => 'foo', | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$viewdefs['base']['view']['foo'] = array( | |
'buttons' => array( | |
array( | |
'type' => 'button', | |
'name' => 'save', | |
), | |
), | |
'name' => 'bar', | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$viewdefs['base']['layout']['foo'] = array( | |
'components' => array(), | |
'type' => 'foo', | |
'name' => 'bar', | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$viewdefs['base']['view']['foo'] = array( | |
'buttons' => array(), | |
'type' => 'foo', | |
'name' => 'bar', | |
'template' => 'detail', | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment