[% SET link = c.uri_for("attachment",att.id) %]
[% SET link = link.replace ('.+//.+?/','/') %]
[% IF c.pref('main_formatter') == "MojoMojo::Formatter::Textile" +%]
"[%att.name%]":[% link %]
[% ELSIF c.pref('main_formatter') == "MojoMojo::Formatter::Markdown" +%]
[[%att.name%]]([% link %])
[% ELSE %]
"[%att.name%]":[% link %]
[% END %]
