It looks like you're new here. If you want to get involved, click one of these buttons!
$config['layout_fields']['about'] = array(
'copy' => array('copy' => lang('layout_field_main_copy')),
'page_title' => array('label' => lang('layout_field_page_title')),
'meta_description' => array('label' => lang('layout_field_meta_description')),
'meta_keywords' => array('label' => lang('layout_field_meta_keywords')),
'heading' => array('label' => 'Heading'),
'pats_blurb' => array('label' => 'Pat\'s Blurb', 'type' => 'textarea'),
'pats_image' => array('label' => 'Pats Image', 'type' => 'file'),
'body' => array('label' => lang('layout_field_body'), 'type' => 'textarea', 'description' => lang('layout_field_body_description')),
);
Comments
'pats_image' => array('label' => 'Pats Image', 'type' => 'text'), 'pats_image_upload' => array('label' => 'Pats Image Upload', 'type' => 'file'),
<?php $patsImage = fuel_var('pats_image_upload'); ?> <img src="<?php echo img_path($patsImage); ?>" class="portfolio-image" alt="sample image" />
This leaves me with 2 more questions.
1. If i go to the pages module and then click on this page, If i change any textfield, but forget to upload the image again, my image is gone. Is there a way to make it so that if the upload field is blank, leave the image that already exists?
2. Using the code posted above, if I try to click on the pencil for the image to edit it inline, I can choose the file from my computer, but when I click save, it doesn't actually upload the file or reload the page. Is there a fix for this?