2010-11-23 100 views

回答

2

有一个单独的动作(也许控制器太......)为你想在iframe内渲染的视图(你可能想要在这个动作中玩$this->_helper->layout()->disableLayout();或者也许改变布局...取决于什么你想实现),那么在你查看你要显示的iframe做

<iframe src="you're iframe action uri"> 
    <p>Your browser does not support iframes.</p> 
</iframe> 
0

相同,因为它是在浏览器中,

设置IFRAME SRC到/控制器/视图/,

认为如果在iframe在页面的浏览器与先进JS控件。

0
  1. 设置适当的文档类型支持的I帧
  2. 然后,

在您的浏览器中:

<iframe src="<?= $this->url(array(
    'module'=>'yourmodule', 
    'controller'=>'yourcontroller', 
    'action'=>'youraction'), 
    'default', true); ?> "> 

    <?= $this->render('/path/to/your/view/youraction.phtml'); ?> 
</iframe>