예제 #1
0
 function createAction()
 {
     if ($this->canDo('layout.create')) {
         if (NextendRequest::getInt('save')) {
             $layoutsModel = $this->getModel('layouts');
             if ($layoutid = $layoutsModel->create(NextendRequest::getVar('layout'))) {
                 if (NextendRequest::getVar('ajax')) {
                     nextendimport('nextend.parse.parse');
                     nextendimportsmartslider2('nextend.smartslider.items');
                     $items = new NextendSliderItems('nextend-smart-slider-0', true);
                     NextendSliderItems::$i['nextend-smart-slider-0'] = time();
                     $layout = $layoutsModel->getLayout($layoutid);
                     echo $items->render($layout['slide']);
                     exit;
                 }
                 header('LOCATION: ' . $this->route('controller=layouts&view=sliders_layouts&action=edit&layoutid=' . $layoutid));
                 exit;
             }
         }
         $this->display('edit', 'create');
     } else {
         $this->noaccess();
     }
 }
예제 #2
0
                            <div class="smartslider-slide-layout-default">
                                <?php 
$layouts = $layoutsModel->getCoreLayouts();
?>
                                <?php 
foreach ($layouts as $layout) {
    ?>
                                    <div class="smartslider-core-layout <?php 
    echo $layout['class'];
    ?>
">
                                        <a class="smartslider-load-layout" href="#"></a>

                                        <div class="smartslider-layout-container">
                                            <?php 
    echo $items->render($layout['slide']);
    ?>
                                        </div>
                                    </div>
                                <?php 
}
?>
                            </div>
                            <div class="smartslider-slide-layout-custom">
                                <?php 
$layouts = $layoutsModel->getLayouts();
?>
                                <dl class="smartslider-list smartslider-sliders-list">
                                    <?php 
$i = 0;
foreach ($layouts as $layout) {