}
function index() {
- $mycharacters = array();
+ $characters = array();
if (empty($this->site_configs['Site.myHome']['value']) && $this->params['url']['url'] == '/') {
-// $this->redirect(array('controller' => 'characters', 'action'=>'mycharacter'));
- $mycharacters = $this->requestAction(
- array('controller' => 'characters', 'action' => 'mycharacter'),
+ $characters = $this->requestAction(
+ array('controller' => 'characters', 'action' => 'index'),
array('return')
);
} else {
// 全体の情報
self::_view($this->user_id);
+ }
- // お知らせ
- $this->set('news', $this->get_news());
- }
+ $this->set('characters', $characters);
- $this->set('mycharacters', $mycharacters);
+ // お知らせ
+ $this->set('news', $this->get_news());
}
function view($id = null) {
-<?php if (!empty($mycharacters)): ?>
-<?php echo $mycharacters ?>
+<?php if (!empty($characters)): ?>
+
+<?php
+if (isset($news)) {
+ echo $this->element('information', array(
+ 'news' => $news,
+ 'cache' => time() + Configure::read('Cache.expireLong'),
+ ));
+}
+?>
+
+<?php echo $characters ?>
<?php else: ?>
<div id="home" class="layout2colums users view">
<?php