function after_save(&$Image) { $Box = new mHomepageImage(); $Box->order = $Box->max('order') + 1; $Box->save($Image); return; }
function update($ImageID) { if ($_POST['field'] == 'title') { $Box = new mHomepageImage($ImageID); $Model = $Box->image; } else { $Model = new mHomepageImage($ImageID); } if ($_POST['field'] == 'order') { $Other = new mHomepageImage(); $Other->order = $_POST['value']; $Other->load(); $Other->order = $Model->order; } $Model->{$_POST['field']} = $_POST['value']; $Result['result'] = $Model->save(); $this->output->delete_cache('/'); if ($Result['result'] === true && isset($Other) && $Other->is_loaded()) { $Other->save(); } echo json_encode($Result); }
echo ifx_PageData::item('home_tagline'); ?> </p> <p class="block-text"><?php echo ifx_PageData::item('home_tagline_text'); ?> </p> <p class="block-logo"><img src="/assets/images/logo/handmade-2.png" /></p> </div> </div> </div> <div id="callouts" class="page-section"> <div class="row"> <h2 class="heading col-xs-12">How we work</h2> <?php foreach (mHomepageImage::active() as $HomepageImage) { ?> <div class="display-box col-xs-4"> <div class="head-image" style="background-image: url('<?php echo IMAGE_ROOT . $HomepageImage->filename; ?> ');"> <!---<img src="<?php echo IMAGE_ROOT . $HomepageImage->filename; ?> " />!---> </div> <div class="content"> <h2><?php echo $HomepageImage->title; ?>