[Skip to main content](#vessel-content)

#   SEF url's in Maximenu

##

- **[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")**
- [![nico.van.leeuwen's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile") Topic Author
- [ Offline](/forum/user/12404-nico-van-leeuwen)

Less More

- Posts: 343
- Thank you received: 28
-
-
- [](http://www.delinie-ict.nl)
-

9 years 10 months ago [\#257956](#257956) by [nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")  *[SEF url's in Maximenu](/forum/30-integrations/887989-sef-urls-in-maximenu#257956 "-- HikaShop version -- : 3.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.0.13  Hi, I have a question about the generation of SEF url's. There is a different result between a Hikashop categorie list and the Megamenu CK.  My situation is : For all categorie listings I manually made a menu-item for having nicer SEF url's. When I click on a menu-item that is a categorielisting I get all the sub-categories (all is fine). When I hover over a sub-categorie I see the nice SEF url without the word &quot;category&quot; in the url. When I unpublish the menu-item of the sub-categorie the url of the sub-categorie has the word &quot;category&quot; back into the url.  Now I'm using Maximenu to create a menu showing all the categories in 1 big list and it works fine. The only thing that is different is that no matter if I publish or unpublish the menu-items for sub-categories, I allways get the word &quot;category&quot; in the url.  For example : Normal Hikashop url :   www.website.nl/webshop/opbergen  Url with Maximenu :   www.website.nl/webshop/ categorie/opbergen  Can anybody explain this ?  Thanks !")* was created by *[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")*

-- HikaShop version -- : 3.6.4
-- Joomla version -- : 3.6.5
-- PHP version -- : 7.0.13

Hi,
I have a question about the generation of SEF url's.
There is a different result between a Hikashop categorie list and the Megamenu CK.

My situation is :
For all categorie listings I manually made a menu-item for having nicer SEF url's. When I click on a menu-item that is a categorielisting I get all the sub-categories (all is fine). When I hover over a sub-categorie I see the nice SEF url without the word "category" in the url.
When I unpublish the menu-item of the sub-categorie the url of the sub-categorie has the word "category" back into the url.

Now I'm using Maximenu to create a menu showing all the categories in 1 big list and it works fine.
The only thing that is different is that no matter if I publish or unpublish the menu-items for sub-categories, I allways get the word "category" in the url.

For example :
Normal Hikashop url : [ www.website.nl/webshop/opbergen](https://www.website.nl/webshop/opbergen)
Url with Maximenu : [ www.website.nl/webshop/](https://www.website.nl/webshop/)**categorie**/opbergen

Can anybody explain this ?

Thanks !

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODc5ODktc2VmLXVybHMtaW4tbWF4aW1lbnU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[ced1870](/forum/user/29000-ced1870 "View ced1870's Profile")**
- [![ced1870's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29000-ced1870 "View ced1870's Profile")
- [ Offline](/forum/user/29000-ced1870)

Less More

- Posts: 73
- Thank you received: 3
-
-

9 years 10 months ago [\#257979](#257979) by [ced1870](/forum/user/29000-ced1870 "View ced1870's Profile")  Replied by *[ced1870](/forum/user/29000-ced1870 "View ced1870's Profile")* on topic *[SEF url's in Maximenu](/forum/30-integrations/887989-sef-urls-in-maximenu#257979 "-- HikaShop version -- : 3.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.0.13  Hi, I have a question about the generation of SEF url's. There is a different result between a Hikashop categorie list and the Megamenu CK.  My situation is : For all categorie listings I manually made a menu-item for having nicer SEF url's. When I click on a menu-item that is a categorielisting I get all the sub-categories (all is fine). When I hover over a sub-categorie I see the nice SEF url without the word &quot;category&quot; in the url. When I unpublish the menu-item of the sub-categorie the url of the sub-categorie has the word &quot;category&quot; back into the url.  Now I'm using Maximenu to create a menu showing all the categories in 1 big list and it works fine. The only thing that is different is that no matter if I publish or unpublish the menu-items for sub-categories, I allways get the word &quot;category&quot; in the url.  For example : Normal Hikashop url :   www.website.nl/webshop/opbergen  Url with Maximenu :   www.website.nl/webshop/ categorie/opbergen  Can anybody explain this ?  Thanks !")*

Hi
@Nicolas @Jerome
nico is using the latest version of Maximenu CK- Hikashop with the native integration

By my side in the code the url is generated like this Code:

JRoute::_('index.php?option=com_hikashop&amp;ctrl=category&amp;task=listing&amp;cid=' . $item-&gt;id . '&amp;name=' . $itemalias . $itemid);

the $itemid is Code:

'&amp;Itemid=' . $hikashopitemid

which is an option where the user (nico) selects the menu item that points to a "categories listing" item

Let me know if there is anything to fix in the code of the plugin to be in accordance with the url management in Hikashop
CEd

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODc5ODktc2VmLXVybHMtaW4tbWF4aW1lbnU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14295
-
-

9 years 10 months ago [\#257993](#257993) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[SEF url's in Maximenu](/forum/30-integrations/887989-sef-urls-in-maximenu#257993 "-- HikaShop version -- : 3.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.0.13  Hi, I have a question about the generation of SEF url's. There is a different result between a Hikashop categorie list and the Megamenu CK.  My situation is : For all categorie listings I manually made a menu-item for having nicer SEF url's. When I click on a menu-item that is a categorielisting I get all the sub-categories (all is fine). When I hover over a sub-categorie I see the nice SEF url without the word &quot;category&quot; in the url. When I unpublish the menu-item of the sub-categorie the url of the sub-categorie has the word &quot;category&quot; back into the url.  Now I'm using Maximenu to create a menu showing all the categories in 1 big list and it works fine. The only thing that is different is that no matter if I publish or unpublish the menu-items for sub-categories, I allways get the word &quot;category&quot; in the url.  For example : Normal Hikashop url :   www.website.nl/webshop/opbergen  Url with Maximenu :   www.website.nl/webshop/ categorie/opbergen  Can anybody explain this ?  Thanks !")*

Hi,

That's normal then.
The code @ced1870 is using in maximenu will generate a URL based on the SEF settings on your HikaShop.
The "category" part comes from the setting "Category SEF name". So when the router system of HikaShop converts the non-SEF URL into a SEF URL it uses that setting to add it to the SEFed URL.
If you don't see it when HikaShop gives the URL but you do with something else, it means that the URL given by HikaShop is not generated, it's the canonical URL of the element.
And it corresponds to the code @ced1870 is using, which doesn't take into account the canonical URL of the elements.

Instead of your code, you could use that code:
hikashop_contentLink('category&amp;task=listing&amp;cid='.$item-&gt;id.'&amp;name='.$itemalias.$itemid,$item);

Provided that $item-&gt;category_canonical contains the category_canonical value of the category, HikaShop will automatically either use the canonical URL of the category or generate the URL (and fill the canonical URL if necessary based on the settings of the HikaShop configuration).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODc5ODktc2VmLXVybHMtaW4tbWF4aW1lbnU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[ced1870](/forum/user/29000-ced1870 "View ced1870's Profile")**
- [![ced1870's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29000-ced1870 "View ced1870's Profile")
- [ Offline](/forum/user/29000-ced1870)

Less More

- Posts: 73
- Thank you received: 3
-
-

9 years 10 months ago [\#258039](#258039) by [ced1870](/forum/user/29000-ced1870 "View ced1870's Profile")  Replied by *[ced1870](/forum/user/29000-ced1870 "View ced1870's Profile")* on topic *[SEF url's in Maximenu](/forum/30-integrations/887989-sef-urls-in-maximenu#258039 "-- HikaShop version -- : 3.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 7.0.13  Hi, I have a question about the generation of SEF url's. There is a different result between a Hikashop categorie list and the Megamenu CK.  My situation is : For all categorie listings I manually made a menu-item for having nicer SEF url's. When I click on a menu-item that is a categorielisting I get all the sub-categories (all is fine). When I hover over a sub-categorie I see the nice SEF url without the word &quot;category&quot; in the url. When I unpublish the menu-item of the sub-categorie the url of the sub-categorie has the word &quot;category&quot; back into the url.  Now I'm using Maximenu to create a menu showing all the categories in 1 big list and it works fine. The only thing that is different is that no matter if I publish or unpublish the menu-items for sub-categories, I allways get the word &quot;category&quot; in the url.  For example : Normal Hikashop url :   www.website.nl/webshop/opbergen  Url with Maximenu :   www.website.nl/webshop/ categorie/opbergen  Can anybody explain this ?  Thanks !")*

Thanks Nicolas
I have sent a new version to Nico of my code using hikashop_contentLink() and it seems to work
Great news !

The following user(s) said Thank You: [Jerome](/forum/user/80-jerome "View Jerome's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODc5ODktc2VmLXVybHMtaW4tbWF4aW1lbnU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.045 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
