Umar Akram Posted October 11, 2013 Share Posted October 11, 2013 i just add file uploader in controller=AdminCmsContent but its is not working can any one guide me how to make that functional ?? Thanks advance for those who try to solve my problem. i need quick help Link to comment Share on other sites More sharing options...
vekia Posted October 11, 2013 Share Posted October 11, 2013 can you show your code please? Link to comment Share on other sites More sharing options...
Umar Akram Posted October 11, 2013 Author Share Posted October 11, 2013 $html_categories = CMSCategory::recurseCMSCategory($categories, $categories[0][1], 1, $this->getFieldValue($this->object, 'id_cms_category'), 1); $this->fields_form = array( 'tinymce' => true, 'legend' => array( 'title' => $this->l('CMS Page'), 'image' => '../img/admin/tab-categories.gif' ), 'input' => array( // custom template array( 'type' => 'select_category', 'label' => $this->l('CMS Category'), 'name' => 'id_cms_category', 'options' => array( 'html' => $html_categories, ), ), array( 'type' => 'text', 'label' => $this->l('Meta title:'), 'name' => 'meta_title', 'id' => 'name', // for copy2friendlyUrl compatibility 'lang' => true, 'required' => true, 'class' => 'copy2friendlyUrl', 'hint' => $this->l('Invalid characters:').' <>;=#{}', 'size' => 50 ), array( 'type' => 'text', 'label' => $this->l('Meta description'), 'name' => 'meta_description', 'lang' => true, 'hint' => $this->l('Invalid characters:').' <>;=#{}', 'size' => 70 ), array( 'type' => 'tags', 'label' => $this->l('Meta keywords'), 'name' => 'meta_keywords', 'lang' => true, 'hint' => $this->l('Invalid characters:').' <>;=#{}', 'size' => 70, 'desc' => $this->l('To add "tags" click in the field, write something, and then press "Enter."') ), array( 'type' =>'file', 'label'=>$this->l('Page Image'), 'name'=>'pImage', 'required' => false, 'display_image' => true ), array( 'type' => 'text', 'label' => $this->l('Friendly URL'), 'name' => 'link_rewrite', 'required' => true, 'lang' => true, 'hint' => $this->l('Only letters and the minus (-) character are allowed') ), array( 'type' => 'textarea', 'label' => $this->l('Page content'), 'name' => 'content', 'autoload_rte' => true, 'lang' => true, 'rows' => 5, 'cols' => 40, 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), array( 'type' => 'radio', 'label' => $this->l('Displayed:'), 'name' => 'active', 'required' => false, 'class' => 't', 'is_bool' => true, 'values' => array( array( 'id' => 'active_on', 'value' => 1, 'label' => $this->l('Enabled') ), array( 'id' => 'active_off', 'value' => 0, 'label' => $this->l('Disabled') ) ), ), ), 'submit' => array( 'title' => $this->l('Save'), 'class' => 'button' ) ); pImage is DATA BASE field name.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now