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?