开发者

Adding an Iframe to a page in ATK4

I want to know if it's possible to add an Iframe Element in ATK4 using something l开发者_开发百科ike $p->add('Iframe').

I know Iframe is not an object, I see there is a 'Frame' class buy it's not clear for me which methods to use to set the frame content.


Using HtmlElement

You can add any element to the page in ATK by this:

$page->add('HtmlElement')->setElement('iframe')->setAttr('src',$url);

Using view with custom template

You can put any HTML into a file (templates/default/view/mytemplate.html) and then include it to your page:

$page->add('View',null,null,array('view/mytemplate'));


More info here: http://agiletoolkit.org/learn/understand/view/usage

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜