How to display the path to the current page in Opencart?
How to display the path to the current page in Opencart?
Описание
Everything is very simple! You need to find the output of an array with breadcrumbs in the controller of the required page, namely the line
$data['breadcrumbs'] = array();Then write the code on the next line:
$data['path_this_page'] = $_SERVER["REQUEST_URI"];Then, if you have Opencart 3, display the code:
{{ path_this_page }}And if you have Opencart 2.x, then:
<?php echo $path_this_page; ?>