Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Use post/product type for breadcrumb urls to use correct route
givanze3284cd9a49e
diff --git a/app/component/breadcrumb.php b/app/component/breadcrumb.phpindex a372dcd..45a785b 100755--- a/app/component/breadcrumb.php+++ b/app/component/breadcrumb.php@@ -36,6 +36,8 @@ class Breadcrumb extends ComponentBase {public $options = [];+ public $cacheExpire = 0; //no cache+function cacheKey() {//disable cachingreturn false;@@ -46,12 +48,13 @@ class Breadcrumb extends ComponentBase {$module = $request->get['module'] ?? '';$slug = $request->get['slug'] ?? '';$name = $request->get['name'] ?? '';+ $type = $request->get['type'] ?? '';$homeText = __('Home');$shopText = __('Shop');$blogText = __('Blog');$urlOptions = [];- if ($this->options['absoluteURL']) {+ if (isset($this->options['absoluteURL'])) {$urlOptions += ['host' => SITE_URL, 'scheme' => $_SERVER['REQUEST_SCHEME'] ?? 'http'];}@@ -59,6 +62,12 @@ class Breadcrumb extends ComponentBase {$urlOptions += ['language'=> $this->options['language']];}+ if ($type) {+ $shopText = __(ucfirst($type));+ $blogText = __(ucfirst($type));+ $urlOptions += ['type'=> $type];+ }+$breadcrumb = [['text' => $homeText, 'url' => url('index/index', $urlOptions)],];