Switch to the offline project
From OpenCms Wiki
(Difference between revisions)
(added sample code) |
m |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
+ | <source lang="java"> | ||
+ | ... | ||
// setting current project to 'Offline' | // setting current project to 'Offline' | ||
CmsRequestContext cmsContext = cmsObject.getRequestContext(); | CmsRequestContext cmsContext = cmsObject.getRequestContext(); | ||
CmsProject offlineProject = cmsObject.readProject("Offline"); | CmsProject offlineProject = cmsObject.readProject("Offline"); | ||
cmsContext.setCurrentProject(offlineProject); | cmsContext.setCurrentProject(offlineProject); | ||
+ | ... | ||
+ | </source> |
Latest revision as of 14:44, 5 January 2012
... // setting current project to 'Offline' CmsRequestContext cmsContext = cmsObject.getRequestContext(); CmsProject offlineProject = cmsObject.readProject("Offline"); cmsContext.setCurrentProject(offlineProject); ...