NP1:Types
From Ask in Wiki
$types = array( 'structure' => array( 'title' => 'Структура', 'input' => array( 'type' => 'db', // db, fs, rss, url 'table' => $config['structure'], 'root_node' => 1, // 1 by default 'limit' => 20, 'fields' => '*', ), 'output' => array( 'cycle' => true, 'templates' => array( 'common' => 'structure.html', ), 'type' => 'tree', 'on_page' => 20, ), 'manager' => array( 'form' => 'pages', 'visible' => true, 'editor' => 'AREA', // AREA, TinyMCE, FCKeditor ), ), 'way' => array( 'title' => 'Путь', 'input' => array( 'type' => 'db', 'table' => $config['structure'], 'root_node' => 1, 'fields' => '*', ), 'output' => array( 'cycle' => true, 'templates' => array( 'top' => 'way.top.html', 'row' => 'way.row.html', 'bottom' => 'way.bottom.html', 'common' => 'way.html', ), 'type' => 'list', 'row_delimiter' => ' >> ', ), 'manager' => array( 'editor' => 'AREA', ), ), 'content' => array( 'title' => 'Контент', 'input' => array( 'type' => 'db', 'table' => $config['structure'], 'fields' => '*', 'id' => isset($PAGE) ? $PAGE->page['id'] : 'manager', ), 'output' => array( 'type' => 'single', ), 'manager' => array( 'editor' => 'AREA', ), ), 'menu' => array( 'title' => 'Меню', 'input' => array( 'type' => 'db', 'table' => $config['structure'], 'root_node' => 1, 'limit' => 20, 'fields' => '*', ), 'output' => array( 'cycle' => true, 'templates' => array( 'top' => 'menu.top.html', 'row' => 'menu.row.html', 'row2' => 'menu.row.2.html', 'bottom' => 'menu.bottom.html', 'common' => 'menu.html', ), 'type' => 'tree', 'levels' => true, ), 'manager' => array( 'editor' => 'AREA', ),
), 'list' => array( 'title' => 'Список', 'input' => array( 'type' => 'db', 'table' => , 'limit' => 20, 'fields' => '*', 'order' => 'name', ), 'output' => array( 'cycle' => true, 'templates' => array( 'top' => 'list.top.html', 'row' => 'list.row.html', 'bottom' => 'list.bottom.html', 'common' => 'list.html', ), 'type' => 'list', 'on_page' => 20, ), 'manager' => array( 'editor' => 'AREA', ), ), 'tree' => array( 'title' => 'Дерево', 'input' => array( 'type' => 'db', 'table' => , 'root_node' => 1, 'limit' => 20, 'fields' => '*', ), 'output' => array( 'cycle' => true, 'templates' => array( 'top' => 'tree.top.html', 'row' => 'tree.row.html', 'bottom' => 'tree.bottom.html', 'common' => 'tree.html', ), 'type' => 'tree', ), 'manager' => array( 'editor' => 'AREA', ), ), 'gallery' => array( 'title' => 'Галлерея', 'input' => array( 'type' => 'db', 'table' => , 'root_node' => 1, 'limit' => 20, 'fields' => '*', ), 'output' => array( 'cycle' => true, 'templates' => array( 'top' => 'gallery.top.html', 'row' => 'gallery.row.html', 'bottom' => 'gallery.bottom.html', 'common' => 'gallery.html', ), 'type' => 'list', 'cols' => 4, 'rows' => 4, 'pages' => true, 'on_page' => 12, ), 'manager' => array( 'editor' => 'AREA', ), ), );
$utypes = array(
'films' => array(
'title' => 'Новинки на DVD',
'base' => 'gallery',
'input' => array(
'table' => 'products',
'order' => 'release_date DESC',
'images' => PATH.'images/films/'
),
'output' => array(
'templates' => array(
'row' => 'film.html',
'NoImage' => BASE.'images/p_default.gif',
),
'fields' => array(
'description' => array(
'first' => 150,
),
),
'type' => 'plain',
'pages' => true,
),
'manager' => array(
'visible' => true,
'editor' => 'AREA',
'form' => 'default',
),
),
'prices' => array(
'title' => 'Прайс-листы',
'base' => 'list',
'input' => array(
'table' => 'prices',
),
'output' => array(
'templates' => array(
'row' => 'price.node.html',
'common' => 'price.table.html',
),
'type' => 'plain',
),
'manager' => array(
'visible' => true,
'editor' => 'AREA',
'form' => 'default',
),
),
'RGallery' => array(
'title' => 'Правая панель',
'base' => 'gallery',
'input' => array(
'type' => 'array',
'array' => array('pr1.gif', 'pr2.gif', 'pr3.gif', 'pr4.gif', 'pr5.gif'),
),
'output' => array(
'pages' => true,
'cols' => 1,
'rows' => 3,
),
),
)

