View Single Post
  #3  
Old 04-09-2015, 12:21 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...

Ah.. I did this...

In XLite/Module/Client/ClientCatsShortDescriptions/View/Model/Category.php now I have

Code:
namespace XLite\Module\Client\ClientCatsShortDescriptions\View\Model; class Category extends \XLite\View\Model\Category implements \XLite\Base\IDecorator { 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, ), '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\Input\Text\CleanURL::PARAM_OBJECT_CLASS_NAME => '\XLite\Model\Category' ), 'meta_title' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Custom HTML title', self::SCHEMA_HELP => 'Leave the field empty to autogenerate a value for the HTML title tag', self::SCHEMA_REQUIRED => false, ), 'meta_tags' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Meta tags', self::SCHEMA_REQUIRED => false, ), 'meta_desc' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Textarea\Simple', self::SCHEMA_LABEL => 'Meta desc', self::SCHEMA_REQUIRED => false, ), '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, ), ); } }

Seems to work.

Cool!
__________________
Core version: 5.3.xx
PHP: 5.6
MySQL: 5.5.50-cll
Web server: Apache
Reply With Quote