Button in list......and

d.bergonzi

Member
Hi Guys,
I hope to be sufficiently short and clear...
I need to include in the list a button that, when clicked, will allow me to perform:
  1. operation on db (any operation .... is not an inquiry now)...
  2. call specific fabrik-list ...
different record can call different operation on db or fabrik list .... depends on the data of the selected record.
With php list plugin I can produce the first result (operations on DB). but do not know how you can call other lists .... or if there is another solution to php plugin list?
Many Thanks!!!!!!!!!!!!!! ;)
 
At the bottom of your code include the redirect. e.g.
PHP:
$app = JFactory::getApplication();
$url = 'page-alias'; // the menu item alias (assuming you are using SEF)
$msg = 'You have been redirected to blah blah blah'; // optional system message
$type= 'warning';  // default message type is 'message';
$app->redirect($url, $msg, $type);
Unless you want to include a system message or specific message type, all you really need is the url - in short...
PHP:
JFactory::getApplication()->redirect('page-alias');
 
Thanks Bauer....:)
This code work on php list plugin?.....i have already tried this solution but nothing happens.

Code:
$app = JFactory::getApplication();
$menu = 'master-ordini-di-acquisto';
$msg = 'OK!';
$app->redirect($menu, $msg, $msgType='message');

where (for this case) master-ordini-di-acquisto is a alias of menu that i want to call.
I also tried to call url direct........for ex.

$menu = 'www.examplesite.com';

But nothing happens. :(
 
Oh......ok.......
I have a particular situation :eek:

The fabrik list is called on article with "content plugin"......this is for my particular needs graphic....
This plug in use "ajax" and from what I understand you can not exclude.

When i try to coll fabrik list direct (in menu)in plug in "php list" the redirect work correctly.

What can i do ? :(
 
Is 'master-ordini-di-acquisto' the alias for a page in a menu? If not create a menu item/link for it.
If entering 'http://yourdomain.com/master-ordini-di-acquisto' in your browser brings up the page - it should also work in the redirect.

As for your redirect code - make it simple...
PHP:
$app = JFactory::getApplication();
$menu = 'master-ordini-di-acquisto';
$app->redirect($menu);
That's all you need. It probably errors because the syntax for the 3rd redirect() parameter in your example is incorrect. If you really need to send a system message you would would optionally include the message type as the 3rd parameter (like 'warning', 'error', or 'message') not $msgType='message'. But like I said, I don't see why you'd need that - the default for that 3rd parameter already is 'message' so there is no need to include it. (Or the 2nd parameter either - unless you want a message to show in the system message container upon redirect that just says "OK!" ?)
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top