0
便利なことに、すべてのテンプレートを特別なディレクトリに配置し、onkeをコンパイルします。今私は自分自身の機能を叱った:Erlydtlディレクトリからテンプレートをロードしています。
make_templates(Dir)->
Files = filelib:wildcard(Dir++"/*.dtl"),
compile(Files,0).
compile([],_)->ok;
compile([File|T],N)->
io:format("Compile file ~p~n",[File]),
R=erlydtl:compile_file(
File,
"template_"++integer_to_list(N),
[{out_dir},"templates"]),
compile(T,N+1).
erlydtlでこれを行うための標準的な方法はありますか?