Custom filters

77 views
Skip to first unread message

Andre Nathan

unread,
Apr 15, 2011, 10:05:46 AM4/15/11
to ErlyDTL Users
Hello

I'm using ErlyDTL on ChicagoBoss here.

Is there a way to specify a module of custom filters to ErlyDTL? The
idea would be to specify useful filters that are not recognized by
Django without having to recompile ErlyDTL.

Maybe ErlyDTL could ship with some of those too. For example, the ones
implemented by the Zotonic developers (e.g. http://zotonic.com/template-tags).

Thanks
Andre

Drew Gulino

unread,
Apr 15, 2011, 11:22:25 AM4/15/11
to erlydt...@googlegroups.com, ErlyDTL Users
It would be great to use zotonic's filters, but it would take some work. They don't directly use erlydtl; they refactored it pretty heavily. I don't know how to include custom filters w/out a recompile; I'll take a look.

Drew Gulino

Drew Gulino

unread,
Apr 18, 2011, 11:38:23 AM4/18/11
to erlydt...@googlegroups.com, ErlyDTL Users
There is a custom_tags_dir in erlydtl:compile that will include a directory of custom tags.

Drew Gulino

On Apr 15, 2011, at 10:05 AM, Andre Nathan <andr...@gmail.com> wrote:

Paul Burt

unread,
Jul 22, 2011, 4:34:31 AM7/22/11
to erlydt...@googlegroups.com
I've written a module of filters for use with Twitter API responses - ie transforms @mentions and #hashtags into clickable links and parses the RFC822 dates used by Twitter.

What is the best way to make this available to ErlyDTL (for use in a webmachine app)?

Evan Miller

unread,
Aug 4, 2011, 12:26:37 AM8/4/11
to erlydt...@googlegroups.com

ErlyDTL needs a "custom_filters_modules" option but doesn't have one
at the moment. For now you need to monkey-patch erlydtl_filters.erl

--
Evan Miller
http://www.evanmiller.org/

Paul Burt

unread,
Aug 4, 2011, 4:16:02 AM8/4/11
to ErlyDTL Users

> ErlyDTL needs a "custom_filters_modules" option but doesn't have one
> at the moment. For now you need to monkey-patch erlydtl_filters.erl

Thanks for confirming, Evan.

Yes, that's what I've done for now. A "custom_filters_modules" option
would be great somewhere down the line, definitely.
Reply all
Reply to author
Forward
0 new messages