When in need of adding a nette filter, if, for example, there is a missing filter or you need an entierly new, follow this process:
- Code or copy the filter to
/app/filters/- If you're adding a missing filter, copy the contents of the filter from corresponding wiki page. Most of the filters should be found here: Nette filters
- In
config.neonsearch forFilters\. There should be something like this
and add another line that should look like this- Filters\Elixir(%wwwDir%) - Filters\ImageExist(%wwwDir%) - Filters\Background(%wwwDir%) - Filters\GradientBackground(%wwwDir%) - Filters\MakePhoto(%wwwDir%) - Filters\FileInfo(%wwwDir%) - Filters\Watermark(%wwwDir%) - Filters\FlattenPhotos - Filters\Link- Filters/YourFilterName - Stay in
config.neon, search fornette.latteFactoryand insetupadd another like looking like this
where- addFilter('invokeName', @Filters\YourFilterName)invokeNameis how you call the filter from latte files and should be in camelCase