|
|
| Author |
Message |
|
| Guest |
Posted: Mon Jul 05, 2010 9:59 am |
|
|
|
Guest
|
|
| Back to top |
|
| Guest |
Posted: Mon Jul 05, 2010 10:20 am |
|
|
|
Guest
|
On 07/05/2010 11:58 AM, Branko Vukelic wrote:
> Hi,
>
> Is there a way to write rendered EHTML to a file instead of returning it?
>
> What I'm trying to do is to make a appmod for generating static HTML
> pages based on user input that will be placed in a directory that is
> served as a regular static site.
>
Almost,
When the yaws server receives your {ehtml, E} data, it calls
yaws_api:ehtml_expand(E) - you can do the same from your code
before returning - if you then don't want the expand to occur
twice, you can do:
{ok,Html} = yaws_api:expand(E),
file:write(FileFd, Html),
{html, Html}
in your code.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Mon Jul 05, 2010 10:34 am |
|
|
|
Guest
|
On Mon, Jul 5, 2010 at 12:19 PM, Claes Wikstrom <klacke@tail-f.com> wrote:
> Almost,
>
> When the yaws server receives your {ehtml, E} data, it calls
> yaws_api:ehtml_expand(E) - you can do the same from your code
> before returning - if you then don't want the expand to occur
> twice, you can do:
>
> {ok,Html} = yaws_api:expand(E),
> file:write(FileFd, Html),
> {html, Html}
Thanks Claes, Rapsey. This was very helpful!
--
Branko Vukelić
bg.branko@gmail.com
studio@brankovukelic.com
Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny
Gimp Brushmakers Guild
http://bit.ly/gbg-group
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
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 can attach files in this forum You can download files in this forum
|
|
|