[opencms-dev] OpenCMS Access
May, Markus
mmay at janolaw.de
Thu Oct 15 17:58:10 CEST 2009
I think we misunderstood each other, probably I was using the word Template in the wrong context.
To clear this up. We are right now using HTML-Files in the OpenCMS without any Templates and/or schema behind. These Files do just contain plain HTML. This is what we are using for the eMail Stuff in our Module, and this is done in JAVA and not in JSPs.
What we are looking for, is basically a way to retrieve the full HTML-file after we migrated to using Templates for them.
R,
Markus
-----Ursprüngliche Nachricht-----
Von: Christoph P. Kukulies [mailto:kuku at physik.rwth-aachen.de]
Gesendet: Donnerstag, 15. Oktober 2009 17:36
An: May, Markus
Betreff: Re: [opencms-dev] OpenCMS Access
Maybe some of the CmsXml classes might do?
Don't know. Is the content of the Email in these XML files?
Would you have to parse the XML?
I'm using the CmsHtmlMail class in a jsp to send Email like this:
CmsHtmlMail htmlmail= new CmsHtmlMail();
htmlmail.addTo("kuku at somewhere.de","Company GmbH");
htmlmail.addCc("meier at somewhere.de","Company GmbH");
htmlmail.setFrom("Infoveranstaltung at company.de");
htmlmail.setSubject("Anmeldung");
htmlmail.setCharset("iso-8859-2");
htmlmail.setHtmlMsg(
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
\"http://www.w3.org/TR/html4/loose.dtd\">\r"+
"<html>\r"+
"<head>\r"+
"<title>Registrierung</title>\r"+
"<style type=\"text/css\">\r"+
"body {\r"+
" font-family: Tahoma, Helvetica, Arial, sans-serif;"+
" font-size: 12px;"+
" text-align: left;"+
" background:#f0f2f4;"+
" color: #11316c;"+
"}"+
"td { text-align: left;\r vertical-align: top;\r"+
"</style>\r"+
...
And the htmlmail.send();
--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
On Thu, Oct 15, 2009 at 05:02:21PM +0200, May, Markus wrote:
> Hello,
>
> We are basically right now reading the Content of the XML-File and therefor we are not able to construct the email from it, because the email should be "transformed" to an HTML-File. Like stated, right now the XML-File is read directly and this file contains a kind of static HTML-page.
>
> IMHO, this should be done in a more CMS like way and we are trying to avoid the readFile() construct. What I would like to get is basically the "exported" HTML-page from the template. Could this be done in a program?
>
> R,
>
> Markus
>
> -----Urspr?ngliche Nachricht-----
> Von: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Christoph P.
> Kukulies
> Gesendet: Donnerstag, 15. Oktober 2009 16:51
> An: The OpenCms mailing list
> Betreff: Re: [opencms-dev] OpenCMS Access
>
> Markus,
>
> what are you intending to do with readFile()?
> Inclusion in templates is mostly done by constructs like
>
> <cms:template element="head" >
> <cms:include file="../elements/head" element="head"/> </cms:template>
>
> Or do I misunderstand something.
>
> On Thu, Oct 15, 2009 at 04:38:46PM +0200, May, Markus wrote:
> > Hello,
> >
> > We have now (finally) transferred our site to 7.5.1, thanks for the great help. We are now trying to do something really easy (at least I hope so).
> >
> > We have a couple of files, which are basically full HTML-Files including the Header and so on. These are mainly used for emailing. Now we would like to use some Templates there as well, so that it is easier to use for our Authors.
> >
> > Right now we are just using the CMSObject.readFile() Method, but this will not work, if we would like to use the Template variant. Any help?
> >
> > Mit freundlichen Gr??en
> >
> > Markus M. May
> --
> Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
>
More information about the opencms-dev
mailing list