×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
Redirect to home after saving
Marcos
New Member
Posts: 5
8 år 9 måneder siden #1213
af Marcos
Redirect to home after saving blev oprettet af Marcos
Hi, could someone help me redirect to the main page after you saved the item on the front end?
At controllers.php I found this line:
// Redirect to the list screen.
$this->setMessage(JText::_('COM_PEDIDODEMUSICA_ITEM_SAVED_SUCCESSFULLY'));
$menu = JFactory::getApplication()->getMenu();
$item = $menu->getActive();
$url = (empty($item->link) ? 'index.php?option=com_pedidodemusica&view=pedidos' : $item->link);
$this->setRedirect(JRoute::_($url, false));
I need change to redirect to home. Thank You
At controllers.php I found this line:
// Redirect to the list screen.
$this->setMessage(JText::_('COM_PEDIDODEMUSICA_ITEM_SAVED_SUCCESSFULLY'));
$menu = JFactory::getApplication()->getMenu();
$item = $menu->getActive();
$url = (empty($item->link) ? 'index.php?option=com_pedidodemusica&view=pedidos' : $item->link);
$this->setRedirect(JRoute::_($url, false));
I need change to redirect to home. Thank You
Venligst Log på eller Opret en konto for at deltage i samtalen
Francesco Reitano
New Member
Posts: 8
8 år 9 måneder siden #1214
af Francesco Reitano
Besvaret af Francesco Reitano på emne Redirect to home after saving
it's easy, change $url:
$url="index.php";
$url="index.php";
Følgende bruger(e) sagde tak: Andres Maeso
Venligst Log på eller Opret en konto for at deltage i samtalen
Marcos
New Member
Posts: 5
8 år 8 måneder siden #1220
af Marcos
Besvaret af Marcos på emne Redirect to home after saving
Works man.. thankyou! But at the last line i need change to:
$this->setRedirect($url);
$this->setRedirect($url);
Venligst Log på eller Opret en konto for at deltage i samtalen
Dariusz
New Member
Posts: 7
8 år 5 måneder siden - 8 år 5 måneder siden #1351
af Dariusz
Besvaret af Dariusz på emne Redirect to home after saving
I have the same question but concerning backend. Can anybody help me please? (concern task save)
EDIT
SOLVED:
overwrite controller:
public function save($key = null, $urlVar = null)
{
$return = parent::save($key, $urlVar);
$this->setRedirect( JRoute::_( 'index.php' ));
return $return;
}
EDIT
SOLVED:
overwrite controller:
public function save($key = null, $urlVar = null)
{
$return = parent::save($key, $urlVar);
$this->setRedirect( JRoute::_( 'index.php' ));
return $return;
}
Sidste redigering: 8 år 5 måneder siden ved Dariusz. Begrundelse: ADD SOLVED
Venligst Log på eller Opret en konto for at deltage i samtalen
Philips Reyes
New Member
Posts: 1
1 år 11 måneder siden #10012
af Philips Reyes
Besvaret af Philips Reyes på emne Redirect to home after saving
This is very simple task for redirect .
I use this seotoolsystem.com/htaccess-redirect-generatorfor redirect purpose this is very quicker approches.
I use this seotoolsystem.com/htaccess-redirect-generatorfor redirect purpose this is very quicker approches.
Venligst Log på eller Opret en konto for at deltage i samtalen
Weaver
New Member
Posts: 1
1 år 10 måneder siden #10028
af Weaver
Besvaret af Weaver på emne Redirect to home after saving
Hello Philips Reyes ,
Thank you so much for your reply , you answer really very helpful for me.
Thank you so much for your reply , you answer really very helpful for me.
Venligst Log på eller Opret en konto for at deltage i samtalen
Tid til at oprette siden: 0.109 sekunder