Reynier
Reynier

Reputation: 2478

Get error while trying to load a twig filter I'm working on

After read the docs I tried my first filter but got this error

The filter "sanitize_for_image_url" does not exist in /var/www/html/src/CategoryBundle/Resources/views/Default/menu.html.twig at line 5.

What I did was:

Did I miss something else?

Upvotes: 0

Views: 266

Answers (1)

Maerlyn
Maerlyn

Reputation: 34107

You're not telling twig about your new filter. You'll also need to modify the getFilters() method of your class.

Upvotes: 2

Related Questions