Show category tree in url

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
DmS
Posts: 56
Joined: 09 Aug 2021, 08:59

Show category tree in url

Post by DmS » 28 Oct 2021, 09:33

I've read the docs and can't really find if this is possible, and if so, how.

Is there any way to easily configure aimeos to create the urls like this:
.../<top-category-url-segment>/<sub-category-url-segment>/<product-url-segment>

As default it only adds the url-segment of the category or product you currently are in, and the customer want's it "as all the other shops"

Thanx in advance!
_____________
Laravel 8 with Aimeos 2021.10.7 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

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

Re: Show category tree in url

Post by aimeos » 29 Oct 2021, 14:13

DmS wrote: 28 Oct 2021, 09:33 Is there any way to easily configure aimeos to create the urls like this:
.../<top-category-url-segment>/<sub-category-url-segment>/<product-url-segment>
You have to overwrite the templates generating the URLs and you must use an appropriate Laravel route for the categories.
DmS wrote: 28 Oct 2021, 09:33 As default it only adds the url-segment of the category or product you currently are in, and the customer want's it "as all the other shops"
Meaning "all other old shops". In the last years, everyone tried to keep the URL as short as possible and without multiple segments for SEO reasons :-)

An alternative is using a longer category segment like
.../<top-category-url-segment-sub-category-url-segment>/<product-url-segment>
The difference is only that there's no slash in the category segment and the shop owner isn't bound to the category hierarchy.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

DmS
Posts: 56
Joined: 09 Aug 2021, 08:59

Re: Show category tree in url

Post by DmS » 29 Oct 2021, 14:37

Thank you.
- "Change templates for urls & add appropriate routes."
Ok that's expected, even if I was hoping for it being a choice in config :)
Is there any spot in the docs that points me to where the templates in question are?

- "the way Old shops do"
I agree, I've also shown the lighthouse score for SEO at 90+ with no optimizing done at all so personally I'm happy with it the way it is. But this came up in the planning for handling all 301/302 in the migration from old to this site.

And basically they want <domain>/category/subcategory/ etc since that's how it is in the old site, of course they also want to remove /default/ as well. Perhaps that can be hidden via some creative rewriting on the server.

I did experiment with the url-segments as well so that one is on the list of possibilities
/Dan
_____________
Laravel 8 with Aimeos 2021.10.7 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

Post Reply