Developer's Manual  Blocks  Property types  custom

custom

Allows assigning user-defined editor to a block property.

The custom type has three additional parameters: file, macro, and param.

file

Required. Specifies editor file name. The editor file should be in the same directory as block file.

macro

Optional. Specifies the name of element to look for macro commands in.

param

Optional. Defines an additional parameter to pass to the editor.

Example

<?
$properties
= Array(
  
'promotion' => Array(
    
'type'     => 'custom',
    
'value'    => Array(
      
'button' => 'Edit',          // button caption
      
'data'   => 'Text'           // property value
    
),
    
'label'    => 'Promotion',
    
'file'     => 'promotion_editor.html',
    
'param'    => Array('News', 'Press release'),
    
'macro'    => Array('data')   // find and execute macro commands in $promotion['data']
  
)
);
?>

For more information on how to create your own editors refer to Writing SiteSupra Application.

Please login to add comments.