Breadcrumb and Active Category in Detailview

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

Breadcrumb and Active Category in Detailview

Post by mantik » 01 Nov 2017, 14:58

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...

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Breadcrumb and Active Category in Detailview

Post by aimeos » 02 Nov 2017, 12:02

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

Re: Breadcrumb and Active Category in Detailview

Post by mantik » 02 Nov 2017, 14:23

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[]

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Breadcrumb and Active Category in Detailview

Post by aimeos » 02 Nov 2017, 22:46

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 4251 times
You can access all configuration in templates with $this->config():
https://aimeos.org/docs/Developers/Html ... per#config
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

Re: Breadcrumb and Active Category in Detailview

Post by mantik » 06 Nov 2017, 08:00

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?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Breadcrumb and Active Category in Detailview

Post by aimeos » 06 Nov 2017, 11:22

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

Re: Breadcrumb and Active Category in Detailview

Post by mantik » 07 Nov 2017, 12:28

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.

User avatar
loeffe1
Posts: 49
Joined: 21 Feb 2020, 10:33

Re: Breadcrumb and Active Category in Detailview

Post by loeffe1 » 13 Jul 2020, 12:59

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...

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Breadcrumb and Active Category in Detailview

Post by aimeos » 15 Jul 2020, 10:15

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/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

oliverthom707
Posts: 1
Joined: 15 Jul 2020, 19:54

Re: Breadcrumb and Active Category in Detailview

Post by oliverthom707 » 15 Jul 2020, 20:00

Are you able to create a pull request for this change? We would love to integrate that into the core :-)

Post Reply