Hi Max,
The form action for saving data in chronoconnectivity.html.php does not call JRoute. This means we lose the menu module context after the save. I replaced with:
This allows the redirects in chronoconnectivity.php to include Itemid but will need to now be:
We then get the correct modules displayed after the save.
I guess we will need a router.php to sort out SEF URLs for chronoconnectivity. I will have a go at this and post the code.
Dave
The form action for saving data in chronoconnectivity.html.php does not call JRoute. This means we lose the menu module context after the save. I replaced with:
<form action="<?php echo JRoute::_
("index.php?option=com_chronoconnectivity&connectionname={$connection->name}&task=saverecord"); ?>"
method="post" name="connectivity" <?php echo $paramsvalues->attformtag; ?> >
This allows the redirects in chronoconnectivity.php to include Itemid but will need to now be:
$mainframe->redirect( JRoute::_("index.php?option=com_chronoconnectivity&connectionname=".$connection->name,false) );
We then get the correct modules displayed after the save.
I guess we will need a router.php to sort out SEF URLs for chronoconnectivity. I will have a go at this and post the code.
Dave
Hi Dave,
Correct, a router.php file will be needed or simply the Itemid can be added to the link, I didn't add the Itemid!
well, try the Itemid thing first because I'm not sure the router.php will work unless you do!
Regards
Max
Correct, a router.php file will be needed or simply the Itemid can be added to the link, I didn't add the Itemid!
well, try the Itemid thing first because I'm not sure the router.php will work unless you do!
Regards
Max
Hi Max,
It appears if you consistently use JRoute then Itemid will be handled for you.
See the following write up on routing http://docs.joomla.org/Routing
Even without a component router.php Itemid will be added to all URLs. I made the changes as described in my last post and the routing now works fine.
I will need to write a router.php for my app as I want SEF URLs, so if you can wait a little while, as I am very busy with my day job, I will post it when it's done and working!
Cheers,
Dave
It appears if you consistently use JRoute then Itemid will be handled for you.
See the following write up on routing http://docs.joomla.org/Routing
Even without a component router.php Itemid will be added to all URLs. I made the changes as described in my last post and the routing now works fine.
I will need to write a router.php for my app as I want SEF URLs, so if you can wait a little while, as I am very busy with my day job, I will post it when it's done and working!
Cheers,
Dave
Hi Dave, That's great!
Thanks
Max
Thanks
Max
This topic is locked and no more replies can be posted.