eZ Community » Forums » eZ Publish 5 Platform » Url filters
expandshrink

Url filters

Url filters

Saturday 07 December 2013 12:53:30 pm - 3 replies

is it possible in the new stack create a URL filter like on legacy? basically I don't want title case urls

Thanks, Gabriele

Wednesday 26 April 2017 12:00:13 pm

Hello,
I venture to dig up this subject because I have found absolutely nothing about it.
And I have exactly the same problem ...

Wednesday 26 April 2017 5:32:57 pm

In my case, all content is administered via the legacy BO.
So it was enough for me to set up an eZURLAliasFilter in the legacy.

site.ini.append.php
[URLTranslator]
FilterClasses[]=MyFilter

src/My/Bundle/BackendBundle/ezpublish_legacy/myextension/urlfilters/bfmfilter.php
class MyFilter extends \eZURLAliasFilter{
    public function process( $text, &$languageObject, &$caller )    {
        return str_replace('_', '-', strtolower($text));
    }
}

Modified on Wednesday 26 April 2017 5:33:26 pm by Rémy PHP

Wednesday 26 April 2017 11:51:24 pm

Hello All,

This topic was discussed recently in the following thread.

http://share.ez.no/forums/ez-platform/urlalias-lowercase-transform-equivalent

We have completed several significant improvements to the above discussed code and packaged the entire solution. We strongly recommend you download and use our new feature complete (usable out of the box) bundle:

We hope these improvements help other users!

If your using legacy only (no hybrid kernel) you can also consider using the default provided url transformation ini configuration instead which is often simpler to implement and support.

I hope this helps!

Cheers,
Heath

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from