class Marten::Template::Tag::Filter

Overview

The filter template tag.

The filter tag allows to apply one or more filters to the content of the tag. For example:

{% filter upcase %}Hello {{ name }}!{% endfilter %}
{% filter upcase|truncate:8 %}Hello world, {{ name }}!{% endfilter %}

Defined in:

marten/template/tag/filter.cr

Constructors

Instance Method Summary

Instance methods inherited from class Marten::Template::Tag::Base

render(context : Context) : String render

Constructor methods inherited from class Marten::Template::Tag::Base

new(parser : Parser, source : String) new

Constructor Detail

def self.new(parser : Parser, source : String) #

[View source]

Instance Method Detail

def render(context : Context) : String #
Description copied from class Marten::Template::Tag::Base

Render the template tag for a given context.


[View source]