Reputation: 43
Can you tell me how to echo the non-sef URL in Joomla 4. The code below and other answers on here work only in Joomla 3:
<?php
$router = JSite::getRouter();// get router
$query = $router->parse(JUri::getInstance()); // Get the real joomla query as an array - parse current joomla link
$url = 'index.php?'.JUri::getInstance()->buildQuery($query);
echo $url;
?>
Upvotes: 0
Views: 653