Page 1 of 1

Breadcrumb and Active Category in Detailview

Posted: 01 Nov 2017, 14:58
by mantik
Hello when i Navigate over an Categorytree i don't see any breadcrumb.

And if i go in the Detailview of an Product the Category lost his Active-State.
Its a little bit Logic because the Code for the active class is (isset($path[$id])) so in the Detailview there is no Category-parameter in the URL.

Is it not possible to solve this smarter?

Also i wish to have a breadcrum in Detailview...

Re: Breadcrumb and Active Category in Detailview

Posted: 02 Nov 2017, 12:02
by aimeos
mantik wrote:Hello when i Navigate over an Categorytree i don't see any breadcrumb.
Do you mean in the URL, e.g. /home/men/shorts?
This is mainly due to TYPO3/frameworks which can't handle slashes in URL parameters well.
mantik wrote:And if i go in the Detailview of an Product the Category lost his Active-State.
Its a little bit Logic because the Code for the active class is (isset($path[$id])) so in the Detailview there is no Category-parameter in the URL.
Yes, that's true. The catalog stage component retrieves the f_catid parameter from the last list view:
https://github.com/aimeos/ai-client-htm ... d.php#L378

It would be also possible to do this in the catalog filter tree part:
https://github.com/aimeos/ai-client-htm ... d.php#L224

Are you able to create a pull request for this change? We would love to integrate that into the core :-)
mantik wrote:Also i wish to have a breadcrum in Detailview...
The breadcrumb in the list and detail view is provided by the catalog stage plugin, not by the detail view itself.

Re: Breadcrumb and Active Category in Detailview

Posted: 02 Nov 2017, 14:23
by mantik
The breadcrumb in the list and detail view is provided by the catalog stage plugin, not by the detail view itself.
But i see it nowhere. I navigate over the Filter. is that the correct way to build an category navigation?
Maybe i can access the categories over the product variable and then build a breadcrumb :D

Other Question how can i acces Typoscript settings in the code?
In extbase normaly its $this->settings[]

Re: Breadcrumb and Active Category in Detailview

Posted: 02 Nov 2017, 22:46
by aimeos
That's the breadcrumb in the detail view if you click on a product in the list view of the "Home" category (doesn't work for top sellers yet, somehow):
aimeos-frontend-breadcrumb.jpg
aimeos-frontend-breadcrumb.jpg (46.26 KiB) Viewed 4253 times
You can access all configuration in templates with $this->config():
https://aimeos.org/docs/Developers/Html ... per#config

Re: Breadcrumb and Active Category in Detailview

Posted: 06 Nov 2017, 08:00
by mantik
that's nowhere... you're sure that's in the typo3 template? in wich content element?
disabled extra my theme to proof the default template... but nowhere apearing...

i proof the code. its in the stage/body-default.php but in the Detailview nowhere the call to the stage block...

so how can i do that?

Re: Breadcrumb and Active Category in Detailview

Posted: 06 Nov 2017, 11:22
by aimeos
It's in the standard Aimeos setup. In TYPO3 it's in the output of the catalog stage plugin and can be found in this template:
https://github.com/aimeos/ai-client-htm ... lt.php#L61

Re: Breadcrumb and Active Category in Detailview

Posted: 07 Nov 2017, 12:28
by mantik
Ok git it and it works.
But there is some bug. when i relod the same page the breadcrum-chain get lost and i see just the root category.

Re: Breadcrumb and Active Category in Detailview

Posted: 13 Jul 2020, 12:59
by loeffe1
Has this ever been fixed? In the demoshop all it ever shows is "Home" or "Your search result" but that'd in no way what breadcrumbs should be doing...

Re: Breadcrumb and Active Category in Detailview

Posted: 15 Jul 2020, 10:15
by aimeos
The standard demo only has one category so there will be no more shown.
The performance demo has several nested categories and there you can see a multi-level breadcrumb:
http://typo3.demo.aimeos.org/performance/f/3/cat-1/

Re: Breadcrumb and Active Category in Detailview

Posted: 15 Jul 2020, 20:00
by oliverthom707
Are you able to create a pull request for this change? We would love to integrate that into the core :-)