예제 #1
0
파일: Image.php 프로젝트: techart/tao
 public function preview()
 {
     CMS::layout_view()->use_scripts('/tao/scripts/admin/vars/image.js');
     Core::load('CMS.Images');
     $url = CMS_Images::modified_image('./' . $this['image'], '150x150');
     $id = 'container-' . md5($this['image']);
     return "<span class='var-image-preview' data-image='{$url}' data-container='{$id}'>[Image]</span>";
 }
예제 #2
0
파일: Helper.php 프로젝트: techart/tao
 public function draw($view, $content)
 {
     $_view = CMS::layout_view();
     CMS::layout_view($view);
     $content = CMS::process_insertions($content);
     CMS::layout_view($_view);
     return $content;
 }
예제 #3
0
파일: Fields.php 프로젝트: techart/tao
 protected function template()
 {
     $template = CMS::layout_view();
     if (!$template) {
         $template = Templates_HTML::Template('empty');
     }
     return $template;
 }
예제 #4
0
파일: Base.php 프로젝트: techart/tao
 protected function render_view($template, array $parms = array(), $layout = '')
 {
     $t = parent::render_view($template, $parms, $layout);
     CMS::layout_view($t);
     return $t;
 }
예제 #5
0
파일: Insertions.php 프로젝트: techart/tao
 static function MAPS($parms = false)
 {
     if (!CMS::layout_view()) {
         return '';
     }
     Core::load('Templates.HTML.Helpers.Maps');
     $parms = explode(';', $parms);
     $type = trim($parms[0]);
     $map_id = trim($parms[1]);
     $name = trim($parms[2]);
     $options = CMS::vars()->get($name);
     return CMS::layout_view()->maps->map($type, $map_id, $name, $options);
 }
예제 #6
0
파일: CMS.php 프로젝트: techart/tao
 /**
  * @param string|false $uri
  */
 static function process_navigation($uri = false)
 {
     if (!empty(self::$navigation)) {
         return self::$navigation;
     }
     if (!$uri) {
         $uri = WS::env()->request->path;
     }
     Core::load(self::$nav_module);
     self::$navigation = Core::make(self::$nav_module);
     self::$navigation->process($uri);
     if (method_exists(self::$navigation, 'layout')) {
         self::$navigation->layout(CMS::layout_view());
     }
 }