Exemplo n.º 1
0
<!DOCTYPE html>
<html lang="<?php 
echo I18n::lang();
?>
">
	<head>
		<?php 
echo Meta::factory($page)->add(array('name' => 'author', 'content' => 'KodiCMS'))->js('jquery', PLUGINS_URL . 'test/public/js/jquery-1.9.0.min.js')->js('bootstrap', PLUGINS_URL . 'test/public/js/bootstrap.min.js', 'jquery')->js('holder', PLUGINS_URL . 'test/public/js/holder.js', 'jquery')->css('bootstrap', PLUGINS_URL . 'test/public/css/bootstrap.min.css');
?>
	</head>
	<body>
		<div class="container">
			<?php 
Block::run('header');
?>
			<?php 
Block::run('bradcrumbs');
?>
			
			<?php 
Block::run('top_banner');
?>

			<div class="row-fluid">
				<div class="col-md-9">
					<div class="page-header">
						<h1><?php 
echo $page->title();
?>
</h1>
					</div>
Exemplo n.º 2
0
 public static function category_meta(\ApiParam $params)
 {
     $metaConfig = array();
     $category = \Category::loadByName($params->categoryEnglishName);
     $category->clientType = \Category::CLIENT_API;
     $city = \City::loadByName($params->cityEnglishName ?: 'shanghai');
     if (!isset(\Page::$context['city'])) {
         \Page::$context['city'] = $city;
     }
     if (!isset(\Page::$context['category'])) {
         \Page::$context['category'] = $category;
     }
     if (!isset($metaConfig['wanted']) && $category->get('wanted')) {
         $meta = \Meta::factory('Radio', $category)->set('name', "wanted")->set('displayName', '供求')->set('controlView', 'radio')->set('style', 'required')->set('values', '1,0')->set('labels', explode('|', $category->get('wanted')));
         $metaConfig['wanted'] = self::metaConfig($meta, $city, $category, $params);
     }
     foreach ($category->metas() as $meta) {
         if (empty($meta->name)) {
             continue;
         }
         $metaConfig[$meta->name] = self::metaConfig($meta, $city, $category, $params);
     }
     //todo 暂时兼容
     if (!isset($metaConfig['images'])) {
         $meta = \Meta::factory('Input', $category)->set('name', "images")->set('displayName', '照片')->set('controlView', 'image')->set('style', '');
         $metaConfig['images'] = self::metaConfig($meta, $city, $category, $params);
     }
     return $metaConfig;
 }
Exemplo n.º 3
0
/*
 * Пример расположение файла шаблона.
 * 
 * Если название шаблона совпадает с названием в папке layouts в корне сайта,
 * то шаблон плагина заменит основной шаблон
 * 
 */
?>
<!DOCTYPE html>
<html lang="<?php 
echo I18n::lang();
?>
">
	<head>
		<?php 
echo Meta::factory($page)->add(array('name' => 'author', 'content' => 'KodiCMS'))->package(array('jquery', 'bootstrap', 'skeleton'));
?>
	</head>
	<body>
		<?php 
Block::run('header');
?>

		<div class="row">
			<div class="col-md-9">
				<?php 
Block::run('body');
?>
			</div>
			<div class="col-md-3">
				<?php