Maulik patel
Maulik patel

Reputation: 1601

add iframe while calling controller to view in codeigniter

call controller to view i use this code.. i want to add "template/home/home" page in to iframe tag while calling controller to view. how can i do?

class main_con extends Controller
{
    function main_con()
    {
        parent::Controller();
//        $this->freakauth_light->check('user');
        $this->_container = $this->config->item('FAL_template_dir') . 'template/container';

        $this->load->library('FAL_front', 'fal_front');
    }   
    function index()
    {
        $data['redirect_page'] = 'template/home/home';
        $this->load->vars($data);
        $this->load->view($this->_container);
    }
}

thank you in advance...

Upvotes: 1

Views: 1399

Answers (1)

Johni
Johni

Reputation: 2959

I'm not quite sure if I understand your problem but:

The iframe is in your view template right? So what you need to do is just print the content of your variable in the src attrib of the iframe.

Upvotes: 2

Related Questions