I want to know if it’s possible to add an Iframe Element in ATK4 using something like $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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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