Jump to content

how to open a render view in a popup


Recommended Posts

Hi,

 

In my own BO module which is done to register some automatic answers (for the SAV) in the database.

In my helper list I have 3 actions: edit, delete and view.

 

in my admin Controller :

  public function renderList()
	{
		$this->addRowAction('edit');
		$this->addRowAction('view');
		$this->addRowAction('delete');
		return parent::renderList();
	}

All is fine: I see my 3 actions buttons for each line.

Then 

  public function renderView()
	{
		$reponseauto = $this->loadObject(true);
		$id_lang = Context::getContext()->language->id;
		
		$tpl = $this->context->smarty->createTemplate(dirname(__FILE__).'/../../views/templates/admin/view/view.tpl');
		$tpl->assign('reponse_auto',$reponseauto->reponse_auto[$id_lang]);
		
		return $tpl->fetch();
	}

Then the content of my automatic response is displayed but in the main page, instead of the list.

My goal is to open this view in a popup as I can see everywhere in the BO for customers, addresses etc...

Do you have an idea to help me ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...