C:/wamp/www/bayadko/fuel/app/views/admin/parents/view.php @ line 1
这是我的view.php
<h2>Viewing #<?php echo $parent->id; ?></h2>
<p>
<strong>User id:</strong>
<?php echo $parent->user_id; ?></p>
<p>
<strong>Password:</strong>
<?php echo $parent->password; ?></p>
<?php echo Html::anchor('admin/parents/edit/'.$parent->id, 'Edit'); ?> |
<?php echo Html::anchor('admin/parents', 'Back'); ?>
这是我在视图中的index.php
<?php foreach ($parents as $parent): ?>
<h3><?php echo Html::anchor('admin/parents/view/'.$parent->user_id, $parent->password) ?></h3>
<?php endforeach; ?>
我的parents.php在班级/控制器
public function action_index()
{
$data['parents'] = Model_Parent::find('all');
$this->template->title = "Parents";
$this->template->content = View::forge('admin/parents/index', $data);
}