filter_trans_filter_filled (zotonic_mod_base v1.0.0-rc.17)

Filters all empty translations from a property.

This is used if it is important to show a text, but not all translations are filled in.

The filter takes as input a resource or other variable and as argument the property to be shown.

Example usage:

{{ id|trans_filter_filled:`body` }}

If the resource id has the body property:

{trans, [{en, <<>>}, {nl,<<"Hallo">>}]}

Then this will show Hallo, even if the language is set to en.

Summary

Functions

trans_filter_filled(Var, Context)

trans_filter_filled(Var, Key, Context)