[Vtigercrm-developers] Fwd: Fwd: Fwd: How to redirect a view in vtiger 6.1 ?

Vic Cekvenich vic.cvc at gmx.com
Mon Aug 18 00:54:00 GMT 2014



-------- Original Message --------
Subject: [Vtigercrm-developers] Fwd: Fwd: How to redirect a view in vtiger 6.1 ?
Date: Sun, 17 Aug 2014 17:40:53 -0700
From: Vic Cekvenich <vic.cvc at gmx.com>
Reply-To: vtigercrm-developers at lists.vtigercrm.com
To: vtigercrm-developers at lists.vtigercrm.com



-------- Original Message --------
Subject: [Vtigercrm-developers] Fwd: How to redirect a view in vtiger 6.1 ?
Date: Sun, 17 Aug 2014 15:00:18 -0700
From: Vic Cekvenich <vic.cvc at gmx.com>
Reply-To: vtigercrm-developers at lists.vtigercrm.com
To: vtigercrm-developers at lists.vtigercrm.com



-------- Original Message --------
Subject: 	[Vtigercrm-developers] How to redirect a view in vtiger 6.1 ?
Date: 	Mon, 14 Jul 2014 19:55:50 +0200
From: 	Holbok István <holbok at gmail.com>
Reply-To: 	holbok at gmail.com, vtigercrm-developers at lists.vtigercrm.com
To: 	vtigercrm-developers at lists.vtigercrm.com 
<vtigercrm-developers at lists.vtigercrm.com>



Dear Vtiger Community,

I would like to redirect a view in vtiger 6.1. What is the best 
suggested way to do it?

Case:
There is an event handler registered to the Contacts (standard) module 
in my Custom module.
The Save action in the Contacts module triggered the event handler and I 
could see, the program executed. The red line log the info to the logfile.

         if($eventName == 'vtiger.entity.aftersave') {
             // Entity has been saved, take next action
*$log->debug('Contacts: vtiger.entity.aftersave --- fired in 
Custommodule directory');*

            // Check some conditions

              // If the conditions true, redirect the view
             $redirectUrl = 
'index.php?module=*Custommodule*&view=*Customview*';
             header("Location: $redirectUrl");

         }

But this method did not work as the http header is already sent.

For example in Joomla CMS MVC pattern there is the built in redirect 
method to set redirect URL and redirect to a new URL inside the program.

I did not find how to do the similar redirect in the vtiger MVC hierarchy.

Is there any suggestion how to do it? What is the best way?

Other way to do the wanted function is to create a modal popup window 
instead of the redirect in this place.
But I also did not find a way to create a modal popup window in the 
Contacts module without rewriting the original code.

Any suggestion is appreciated.

Kindest regards:
Istvan


-- 
üdvözlettel:

*Holbok István*

+3670-342-0900
*e-mail:* holbok at gmail.com
*SkyPe:* holboki



-------------- next part --------------
_______________________________________________
http://www.vtiger.com/
-------------- next part --------------
_______________________________________________
http://www.vtiger.com/
-------------- next part --------------
_______________________________________________
http://www.vtiger.com/


More information about the vtigercrm-developers mailing list