The configuration of a template variation is assumed to be application_name::variation/template_name
.
init: | Optional. A callback function. Call to initialize a |
||||
---|---|---|---|---|---|
admin: | Array
See also |
||||
layout: | Optional. A callback function. If exist, the return value overload the template configuration. Take the |
||||
cols: | Optional. A callback function. If exist, the return value overload the template configuration. Take the |
||||
rows: | Optional. A callback function. If exist, the return value overload the template configuration. Take the |
||||
file: | Optional. A callback function. If exist, the return value overload the template configuration. Take the |
||||
screenshot: | Optional. A callback function. If exist, the return value overload the template configuration. Take the |
See also
<?php
return array(
'cols' => function($tpvar) {
return int_val($tpvar->tpvar_data['cols']);
},
'admin' => array(
'layout' => array(
'content' => array(
'expander' => array(
'view' => 'nos::form/expander',
'params' => array(
'title' => __('Configuration'),
'options' => array(
'allowExpand' => false,
),
'content' => array(
'view' => 'nos::form/fields',
'params' => array(
'fields' => array(
'menus->principal->menu_id',
'cols',
),
),
),
),
),
),
),
'fields' => array(
'menus->principal->menu_id' => array(
'label' => __('Menu'),
'renderer' => 'Nos\Renderer_Item_Picker',
'renderer_options' => array(
'model' => 'Nos\Menu\Model_Menu',
'appdesk' => 'admin/noviusos_menu/menu/appdesk',
'defaultThumbnail' => 'static/apps/noviusos_menu/img/64/menu.png',
'texts' => array(
'empty' => __('No menu selected'),
'add' => __('Pick a menu'),
'edit' => __('Pick another menu'),
'delete' => __('Un-select this menu'),
),
),
),
'cols' => array(
'label' => __('Column number'),
'form' => array(
'type' => 'number',
),
),
),
),
);