因此,我认为这一部分内容是:
<body>
<div id = "content">
<?php echo $catalog ?>
</div>
</body>
其中还有其他变量。 这里是我的主计长的一部分,我在那里把他们寄给观点:
$this->load->view( layout ,array(
categories => $categories,
home_menu => $home_menu,
information => $information,
favourite => $favourite,
new_products => $new_products,
bestsellers => $bestsellers,
login_info => $login_info,
catalog =>
));
我想创建第二位控制器,一旦启动,就会对可变的<代码>($catalog)发出第二个看法。
与此类似(类似于Kohaana):
$this->layout->catalog = $this->load->view( products/catalog , array(
name => $name,
description => $description));
但它没有发挥作用。
我的问题是,在点击启动第二名主计长的链接之后,我如何表明这种第二点意见?
EDIT:
但是,在用户点击启动第二个控制器的链接后,我想将<>catalog view发送至$catalog变量。
$products = $this->Product_model->list_products($category_id);
foreach ($products as $row)
{
$name = $row->name;
$description = $row->description;
}
.. after that I want $name and $description to be passed to:
$this->load->view( products/catalog , array(
name => $name,
description => $description));
拟通过如下案文:$catalog/code> in the layout view specified in the first controller.