Question

I am working in a component to Joomla! 3 but I am having a litle issue.

I have this: $primary_link->setUrl(JRoute::_('index.php?option=com_sweetmail&task=item&item_id=' . $item->getId(), false)); that creates URL something like: http:://www.mysite.com/component/sweetmail/item/example.

What I am trying to do is rewrite JRoute dynamically, to delete /component/sweetmmail/item

Is this possible?

Was it helpful?

Solution

You will need a router.php for the sweetmail component. Currently you don't have one. Check the router.php under the com_banners component to see how it's done. Essentially you will need to to create and to parse the URL. Not that complicated.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top