Re: Email template with css
Ok, thnx! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Email-template-with-css-tp4665788p4665793.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Email template with css
Hi, On Mon, May 12, 2014 at 5:36 PM, Sandor Feher wrote: > Hi, > > I use WebPages for rendering my emails content. The above code works fine > but I can't get my css styles work in this way. > > public String renderTemplate(WebPage webPage) { > BufferedWebResponse bufferedWebResponse = new > BufferedWebResponse(null); > webPage.getRequestCycle().setResponse(bufferedWebResponse); > webPage.render(); > > return bufferedWebResponse.getText().toString(); > } > > Whether I include them with wicket:link or add them at renderHead none of > them work. > I suspect this is why because my email client has nothing to do with > wicket's resources so this could not be work in this way. > Right. For such pages you have to inline all CSS in
Email template with css
Hi, I use WebPages for rendering my emails content. The above code works fine but I can't get my css styles work in this way. public String renderTemplate(WebPage webPage) { BufferedWebResponse bufferedWebResponse = new BufferedWebResponse(null); webPage.getRequestCycle().setResponse(bufferedWebResponse); webPage.render(); return bufferedWebResponse.getText().toString(); } Whether I include them with wicket:link or add them at renderHead none of them work. I suspect this is why because my email client has nothing to do with wicket's resources so this could not be work in this way. If I add styles to every template then it works fine but I'm looking for some more elegant way to accomplish this. TIA, Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Email-template-with-css-tp4665788.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org