Child pages
  • [template parser] Tag filter concept [5.3.0-B1]
Skip to end of metadata
Go to start of metadata

Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/7a9b8010aee7dcd5#

I was looking at Twig template parser, used in Symfony, recently and found interesting filter approach used in there.

In Twig filter is after-processing applied to tag result. Basically all our:

  • escaping
  • comparing
  • tab removal

is done there as filters. However that concept goes far beyond that - each Twig plugin can define it's own filter, that can be used with ANY OTHER tag from any other module.

Also it's easily provides ability add block tags per module.

I also recommend digging deeper into Twig code to find more ways to organize cross-module communication, e.g. shared tags, shared events.

Related Discussions

1 Comment

  1. Hi Alex,

    Thank you for your research and report on this.

    I do agree we should continue reviewing this since it can bring more
    benefits to our parser too.

    DA