Closed sebkln closed 3 years ago
Why not using the core slug field? https://docs.typo3.org/m/typo3/reference-tca/master/en-us/ColumnsConfig/Type/Slug.html
Thanks for the hint. I actually started with the slug
TCA type, but it had some disadvantages.
I also wrote about it on my blog. Excerpt:
In a first attempt, I had used a TCA field of the type "slug" instead. This seemed promising–I was able to configure the TCA to fill my new fragment field with the contents of the header field. Just like the slug field for pages, an editor could also perform this by clicking a button next to the field. But it had two disadvantages: first, the fragment field became mandatory by this, which might not always be desirable. Second, the slug evaluation filtered out some characters–but not the slash, for example. And the slash cannot be used in URL fragments.
The button is already in place, implemented as described here. I also added a custom PSR-7 Ajax route for the backend and tried to familiarize myself with RequireJS.
The work on this is currently paused though, as I work on a relaunch of my blog.
I see. Thanks for the response. Quite some text. Will check that asap.
The work on this is currently paused though, as I work on a relaunch of my blog.
Nice
Similar to the pages' slug field: provide a button that allows the editor to generate an anchor from the contents of the header field.