[REQ] Possible system for slugs

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Yvler
Posts: 33
Joined: 04 Jun 2015, 10:15

[REQ] Possible system for slugs

Post by Yvler » 17 Sep 2015, 13:16

Is there already a system for using slugs in stead of passing the values in the request parameter of the url?
It would be more interesting for SEO to use
"/category/cat-2" in stead of "/list?f_name=cat-2&f_catid=4562"

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

Re: [REQ] Possible system for slugs

Post by aimeos » 17 Sep 2015, 13:29

In theory yes, but the routing implementation of Laravel 4/5 is buggy and optional parameters cause routes to fail:
https://github.com/laravel/framework/pull/8198

You can only try to work around this by creating a separate page and route that are used when a category is shown and the "f_name" and "f_catid" parameter are mandatory.

Yvler
Posts: 33
Joined: 04 Jun 2015, 10:15

Re: [REQ] Possible system for slugs

Post by Yvler » 22 Sep 2015, 07:37

That was our backup plan ;-) and we'd probably create another table where a slug is saved and where this slug is linked to these parameters :)
not the best way to do it, but I don't see a better solution at this time

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

Re: [REQ] Possible system for slugs

Post by aimeos » 22 Sep 2015, 08:31

Yvler wrote:That was our backup plan ;-) and we'd probably create another table where a slug is saved and where this slug is linked to these parameters :)
You don't need another table. The mshop_catalog and thus the catalog items contains all you need, including the possibility to define URL segments (a.k.a. slugs) as associated texts.

swpierce
Posts: 53
Joined: 01 Nov 2015, 13:19

Re: [REQ] Possible system for slugs

Post by swpierce » 24 Nov 2015, 23:31

Apologies for digging up an old thread, but anyone know if the referenced URL generator bug is fixed in Laravel 5.1? I'm guessing not looking at the laravel repository but I could be missing it too ;)

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

Re: [REQ] Possible system for slugs

Post by aimeos » 25 Nov 2015, 11:18

I'm not aware of that. The buggy behavior is immanent in the router implementation and Tylor had no idea how to fix that without breaking the rest.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply