0
Assistant Support

How to display the path to the current page in Opencart?

How to display the path to the current page in Opencart?

1 reviews
26.01.2021

Описание

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

<code>$data[&#39;breadcrumbs&#39;] = array();</code>

Then write the code on the next line:

<code>$data[&#39;path_this_page&#39;] = $_SERVER[&quot;REQUEST_URI&quot;];</code>

Then, if you have Opencart 3, display the code:

<code>{{ path_this_page }}</code>

And if you have Opencart 2.x, then:

<code>&lt;?php echo $path_this_page; ?&gt;</code>
Автор: DEV-OPENCART.COM

%s reviews

Write a review

Пожалуйста, поставьте оценку:

Bookmarks

Cart (0)

Contacts

Technical support from 10:00 to 19:00, seven days a week

Web laboratory «DEV-OPENCART».
All rights reserved (c) 2018-2026