[opencms-dev] OpenCms5 - set Template of Resource Type Page from Java class ???
Jozef Chocholáček
jozef.chocholacek at qbizm.cz
Tue Jan 10 13:38:31 CET 2006
james wrote:
> I can create an html page and set its Title, NavText, etc properties
> from my Java class, but how do I set the template that it uses??? OpenCms 5.
>
> public void createIndexPage() throws CmsException {
> Hashtable prop = new Hashtable();
> prop.put("Title", pageName);
> prop.put("NavPos", "1");
> prop.put("NavText", "Mini-site for " + uniqueFolderName);
> cms.createResource(minisiteRoot + uniqueFolderName + "/", pageName,
> CmsResource.C_TYPE_PAGE_NAME, prop);
I use
...
CmsResourceTypePage page = (CmsResourceTypePage)
cms.getResourceType("page");
page.createResourceForTemplate(cms,filename,properties,"".getBytes(),masterTemplate);
J.Ch.
--
Ing. Jozef Chocholacek Qbizm technologies, a.s.
hlavni analytik ... the art of software.
____________________________________________________________________
www.qbizm-technologies.cz www.qbizm.cz www.qbizm-services.cz
More information about the opencms-dev
mailing list