Carry out the following steps:
As adding and editing a block is pretty much the same, we're going to create a file named
form_setup_html.php
, which is shared by both,add.php
andedit.php
.First, let's create
add.php
andedit.php
; both are rather simple and identical because everything is located inform_setup_html.php
:<?php defined('C5_EXECUTE') or die('Access Denied.'); $this->inc('form_setup_html.php'); ?>
In a new file
form_setup_html.php
, save the following content:<?php defined('C5_EXECUTE') or die('Access Denied.'); $al = Loader::helper('concrete/asset_library'); echo '<div class="ccm-block-field-group">'; echo '<h2>' . t('Title') . '</h2>'; echo $form->text('title', $title, array('style' => 'width: 550px')); echo '</div>'; echo '<div class="ccm-block-field-group">'; echo '<h2>' . t('Picture') . '</h2>'; echo $al->image('ccm-b-image', 'fIDpicture', t('Choose File'),$this...