Add HTML content to meta box

We assume that you already know how to set cols width and create a meta box. For this small tutorial, you will learn how to add DOM inside meta box.

this process is not used to create meta box footer. But only to add DOM content inside a meta box.

Here is what you should do

<?php
$this->gui->set_item( array(
  	'type'		=>		'dom'
  	'value'		=>		'<H1>Hello World</H1>'
) )->push_to( 'custom' );

The easiest way to add full dom document

You can include you view using "the_view" method of Loader Class.

Since you '__extends()' current controller which herits from 'Libraries' Class and construct the parent (parent::__construct()), you can access this Loader Class using $this->load.

Here is an example :

<?php
$view	=	$this->load->the_view( '/sample.php' , true ); // where true means Return  value.

$this->gui->set_item( array(
  	'type'		=>		'dom',
  	'value'		=>		$view
) )->push_to( 'custom' );

Instead, you can use ob_start() and ob_clean_flush() functions to get view value.