Create a link from Backend to SEF Path in Frontend

by spiNOops   Last Updated October 14, 2019 07:10 AM - source

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.

What the best way to do this (if it's possible?)

Thanks !

Tags : joomla-3.x


Related Questions