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
精彩评论