I would like to create a link in Administrator Panel that redirect a user to an SEF url in Frontend.
Code in Backend
<?php
$link = JUri::root() . 'index.php?option=com_content&view=article&id=1';
echo '<a href="'. JRoute::_($link) . '">Test</a>'
?>
This can't be translated to SEF because I use JUri::root()
in my $link
.
If it's possible, what is the best way to do this?