0

How to return an iframe embedded link?

use Magento\Framework\View\Element\Template;

class Msg extends Template
{
    public function __construct(Template\Context $context, array $data = [])
    {
        parent::__construct($context, $data);
    }

    public function Msg()
    {

        return "<iframe src="https://URL/" width="100%" scrolling="auto" height="600px" frameborder="0" align="center"></iframe>";
    }
}

Am I doing it wrong?

  • Nevermind, I fixed it: replaced " with ' and everything works now. – rob Mar 21 at 9:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.