View Single Post
  #4  
Old 08-07-2015, 01:40 AM
 
xgarb xgarb is offline
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 262
 

Default Re: x5 New 'Short Description' Field in Categories - Solution and Question...

UPDATE

For 5.2.6 function method needs to look like this...

Code:
public function __construct(array $params = array(), array $sections = array()) { parent::__construct($params, $sections); $this->schemaDefault = array( 'name' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Category name', self::SCHEMA_REQUIRED => true, ), 'parent' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Select\Category', self::SCHEMA_LABEL => 'Parent category', self::SCHEMA_REQUIRED => true, ), 'show_title' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Select\CategoryShowTitle', self::SCHEMA_LABEL => 'Show Category title', self::SCHEMA_REQUIRED => false, ), 'image' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\FileUploader\Image', self::SCHEMA_LABEL => 'Category icon', self::SCHEMA_REQUIRED => false, ), 'shortDescr' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Textarea\Advanced', self::SCHEMA_LABEL => 'Short Description', self::SCHEMA_REQUIRED => false, ), 'description' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Textarea\Advanced', self::SCHEMA_LABEL => 'Description', self::SCHEMA_REQUIRED => false, \XLite\View\FormField\Textarea\Advanced::PARAM_STYLE => 'category-description', ), 'cleanURL' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text\CleanURL', self::SCHEMA_LABEL => 'Clean URL', self::SCHEMA_REQUIRED => false, \XLite\View\FormField\AFormField::PARAM_LABEL_HELP => 'Human readable and SEO friendly web address for the page.', \XLite\View\FormField\Input\Text\CleanURL::PARAM_OBJECT_CLASS_NAME => 'XLite\Model\Category' ), 'meta_title' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Category page title', self::SCHEMA_REQUIRED => false, self::SCHEMA_COMMENT => 'Leave blank to use category name as Page Title.', ), 'meta_tags' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Meta keywords', self::SCHEMA_REQUIRED => false, ), 'meta_desc_type' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Select\MetaDescriptionType', self::SCHEMA_LABEL => 'Meta description', self::SCHEMA_REQUIRED => false, ), 'meta_desc' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Textarea\Simple', self::SCHEMA_LABEL => '', \XLite\View\FormField\AFormField::PARAM_USE_COLON => false, self::SCHEMA_REQUIRED => false, self::SCHEMA_DEPENDENCY => array( self::DEPENDENCY_SHOW => array ( 'meta_desc_type' => array('C'), ) ), ), 'memberships' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Select\Memberships', self::SCHEMA_LABEL => 'Memberships', self::SCHEMA_REQUIRED => false, ), 'enabled' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Checkbox\Enabled', self::SCHEMA_LABEL => 'Enabled', self::SCHEMA_REQUIRED => false, ), ); }
__________________
Core version: 5.3.xx
PHP: 5.6
MySQL: 5.5.50-cll
Web server: Apache
Reply With Quote