hi,
when i set tpl variable tag in tpl file like this:
<a wpart:href="/language/en/{reload_url}">English</a>
And i add some code add my erl file, like this:
show_item(Args) ->
%% put the show_item function body here
N = list_to_integer(proplists:get_value(id, Args)),
Item = wtype_item:read(N),
RUrl = wpart:fget("__path"),
wpart:fset("item", wtype_item:format(Item)),
wpart:fset("reload_url", RUrl),
wpart_lang:get_translation("login_name"),
{template, "item/show.html"}.
when i recompile and restart service, i browse the app url, find tpl tag is replace like:
<a href="/language/en/"item/show/15"">English</a>
reload_url tag is replaced and some special characters not i wished..
please give me a hand, thanks! :)
|