|
|
| Author |
Message |
|
| Guest |
Posted: Tue Apr 13, 2010 7:38 am |
|
|
|
Guest
|
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
|
|
|
| Back to top |
|
| Guest |
Posted: Tue Apr 13, 2010 8:54 am |
|
|
|
Guest
|
Hi,
----- "AndyChow" <diudiu8848@163.com> wrote:
> hi,
>
> when i set tpl variable tag in tpl file like this:
>
> <a wpart:href="/language/en/{reload_url}">English</a>
The wpart above will be expanded to
"/language/en/"reload_url""
In order to skip "" inside of the attributes values, use:
<a wpart:href="/language/en/{[string]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!
>
> _______________________________________________
> Erlangweb-users mailing list
> Erlangweb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlangweb-users
> http://www.erlang-web.org/
Best regards,
Michal Ptaszek
---------------------------------------------------
---------------------------------------------------
WE'VE CHANGED NAMES!
Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.
www.erlang-solutions.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Erlangweb-users mailing list
Erlangweb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlangweb-users
http://www.erlang-web.org/
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|