You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 9, 2023. It is now read-only.
I know you guys are hard at work on v3 but please consider this feature.
Is your feature request related to a problem? Please describe.
We've found that there are a lot of situations with collections where more control over the auto-generated slugs is warranted, either because there's a lot of title/naming duplication or because routing is unneccesary.
A recent example, a client needed a calendar to display events. No routing or entry view, just list the entry on the calendar. This was done with a collection but the nature of the calendar has a lot of redundancy in the titles so there's an ongoing problem/complaint of duplicate slugs. For slugs that aren't used.
Another common problem is for collections with routable entries with a lot of title redundancy. We'd like to be able to adjust the slug to autoincrement or make the slugs unique from one another.
Describe the solution you'd like
Add a new event, Event::fire('cp.publishing', $this->request), to the begning of the publish() method in core/CP/Publish/Publisher.php. This is a simple one-liner that would allow addons a lot of flexibility to modify the request (before validation, so the modified data would still get validated) to produce the exact auto-generated slugs needed.
Describe alternatives you've considered
There are no other alternatives I can identify. Slug is a special fieldtype that cannot be overridden and it's behavior cannot be modified. There are no other events that can be hooked into during the saving process and before validation.
The text was updated successfully, but these errors were encountered:
I know you guys are hard at work on v3 but please consider this feature.
Is your feature request related to a problem? Please describe.
We've found that there are a lot of situations with collections where more control over the auto-generated slugs is warranted, either because there's a lot of title/naming duplication or because routing is unneccesary.
A recent example, a client needed a calendar to display events. No routing or entry view, just list the entry on the calendar. This was done with a collection but the nature of the calendar has a lot of redundancy in the titles so there's an ongoing problem/complaint of duplicate slugs. For slugs that aren't used.
Another common problem is for collections with routable entries with a lot of title redundancy. We'd like to be able to adjust the slug to autoincrement or make the slugs unique from one another.
Describe the solution you'd like
Add a new event,
Event::fire('cp.publishing', $this->request)
, to the begning of thepublish()
method incore/CP/Publish/Publisher.php
. This is a simple one-liner that would allow addons a lot of flexibility to modify the request (before validation, so the modified data would still get validated) to produce the exact auto-generated slugs needed.Describe alternatives you've considered
There are no other alternatives I can identify. Slug is a special fieldtype that cannot be overridden and it's behavior cannot be modified. There are no other events that can be hooked into during the saving process and before validation.
The text was updated successfully, but these errors were encountered: