Skip to main content

Breadcrumb content question

More
2 years 5 months ago #360475 by Sandra74
-- HikaShop version -- : 5.0.3
-- Joomla version -- : 5.0.3
-- PHP version -- : 8.2

Hi,

I have a breadcrumb display and hope you can help me.

For products, the breadcrumbs is using the name field of the product page. Do you know if it would be possible (and if yes how) to use the alias instead of the name?

Thanks in advance!

Sandra

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago - 2 years 5 months ago #360483 by nicolas
Replied by nicolas on topic Breadcrumb content question
Hi,

I suppose you can use Joomla's Pathway API to modify the breadcrumb on the fly in a view override of the product page layout.
For example, you can edit product / show_default via the menu Display>Views of HikaShop and add this at the beginning:
Code:
<?php $app = JFactory::getApplication(); $pathway = $app->getPathway(); $names = $pathway->getPathwayNames(); $pathway->setItemName(count($names)-1, $this->element->product_alias); ?>
Based on:
www.phoca.cz/apis/1-joomla/573-pathway
Note that this code has not been tested. I've written this on the fly so it might not work, but it should be something close to this.
Last edit: 2 years 5 months ago by nicolas.
The following user(s) said Thank You: Sandra74

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago #360488 by Sandra74
Hi Nicolas,

I have just 2 words: You rock!!!

It works like a charm.

Thank you so much.

Sandra

Please Log in or Create an account to join the conversation.

Time to create page: 0.208 seconds
Powered by Kunena Forum