'c', 'ItemClass' => Array('class'=>'CategoriesItem','file'=>'categories_item.php','build_event'=>'OnItemBuild'), 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), 'EventHandlerClass' => Array('class'=>'CategoriesEventHandler','file'=>'categories_event_handler.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'CategoriesTagProcessor','file'=>'categories_tag_processor.php','build_event'=>'OnBuild'), 'AutoLoad' => true, 'QueryString' => Array( 1 => 'id', 2 => 'page', 3 => 'event', 4 => 'mode', ), 'AggregateTags' => Array( Array( 'AggregateTo' => 'm', 'AggregatedTagName' => 'CategoryLink', 'LocalTagName' => 'CategoryLink', ), ), 'IDField' => 'CategoryId', 'TitleField' => 'Name', // field, used in bluebar when editing existing item 'ItemType' => 0, // this is used when relation to product is added from in-portal and via-versa 'TableName' => TABLE_PREFIX.'Category', 'ViewMenuPhrase' => 'la_text_Categories', 'TitlePresets' => Array( 'category_list' => Array('prefixes' => Array('c_List'), 'format' => "!la_title_Categories! (#c_recordcount#)"), ), 'ListSQLs' => Array( ''=> 'SELECT %1$s.* %2$s, IF(%1$s.NewItem = 2, IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - 10*3600*24), 1, 0), %1$s.NewItem) AS IsNew '. // 10 - Category_NewDays value from ConfigurationValues table 'FROM %1$s LEFT JOIN '.TABLE_PREFIX.'PermCache ON '.TABLE_PREFIX.'PermCache.CategoryId = %1$s.CategoryId'), // key - special, value - list select sql 'ItemSQLs' => Array( ''=> 'SELECT *, IF(%1$s.NewItem = 2, IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - 10*3600*24), 1, 0), %1$s.NewItem) AS IsNew '. // 10 - Category_NewDays value from ConfigurationValues table 'FROM %s'), 'ListSortings' => Array( '' => Array( 'ForcedSorting' => Array("CurrentSort" => 'asc', 'Priority' => 'desc', 'Name' => 'asc'), 'Sorting' => Array('Name' => 'asc'), ) ), 'CalculatedFields' => Array( '' => Array( 'CurrentSort' => "REPLACE(ParentPath, CONCAT('|', ".'%1$s'.".CategoryId, '|'), '')", ) ), 'Fields' => Array ( 'CategoryId' => Array('type' => 'int','not_null' => '1','default' => ''), 'Type' => Array('type' => 'int','not_null' => '1','default' => '0'), 'ParentId' => Array('type' => 'int','not_null' => '1','default' => '0'), 'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => '1','default' => ''), 'Filename' => Array('type' => 'string','not_null' => '1','default' => ''), 'AutomaticFilename' => Array('type' => 'int','not_null' => '1','default' => '0'), 'Description' => Array('type' => 'string','not_null' => '1','default' => ''), 'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default'=>'#NOW#', 'not_null' => '1'), 'EditorsPick' => Array('type' => 'int','default' => ''), 'Status' => Array('type' => 'int','not_null' => '1','default' => '0'), 'Pop' => Array('type' => 'int','default' => ''), 'Priority' => Array('type' => 'int','default' => ''), 'MetaKeywords' => Array('type' => 'string','default' => ''), 'CachedDescendantCatsQty' => Array('type' => 'int','default' => ''), 'CachedNavbar' => Array('type' => 'string','not_null' => '1','default' => ''), 'CreatedById' => Array('type' => 'int','not_null' => '1','default' => '0'), 'ResourceId' => Array('type' => 'int','default' => ''), 'ParentPath' => Array('type' => 'string','not_null' => '1','default' => ''), 'NamedParentPath' => Array('type' => 'string','not_null' => '1','default' => ''), 'MetaDescription' => Array('type' => 'string','default' => ''), 'HotItem' => Array('type' => 'int','not_null' => '1','default' => '2'), 'NewItem' => Array('type' => 'int','not_null' => '1','default' => '2'), 'PopItem' => Array('type' => 'int','not_null' => '1','default' => '2'), 'Modified' => Array('type' => 'int','not_null' => '1','default' => '0'), 'ModifiedById' => Array('type' => 'int','not_null' => '1','default' => '0'), ), 'VirtualFields' => Array( 'CurrentSort' => Array('type' => 'string', 'default' => ''), ), 'Grids' => Array( 'Default' => Array( 'Icons' => Array('default'=>'icon16_cat.gif'), 'Fields' => Array( 'Name' => Array( 'width'=>150, 'title'=>'la_col_Title', 'data_block'=>'category_td' ), ), ), ), 'ConfigMapping' => Array( 'PerPage' => 'Perpage_Category', 'DefaultSorting1Field' => 'Category_Sortfield', 'DefaultSorting2Field' => 'Category_Sortfield2', 'DefaultSorting1Dir' => 'Category_Sortorder', 'DefaultSorting2Dir' => 'Category_Sortorder2', ), ); ?>