Switch to the offline project

From OpenCms Wiki
(Difference between revisions)
Jump to: navigation, search
m
 
Line 1: Line 1:
// setting current project to 'Offline'
+
<source lang="java">
CmsRequestContext cmsContext = cmsObject.getRequestContext();
+
...
CmsProject offlineProject = cmsObject.readProject("Offline");
+
// setting current project to 'Offline'
cmsContext.setCurrentProject(offlineProject);
+
CmsRequestContext cmsContext = cmsObject.getRequestContext();
 +
CmsProject offlineProject = cmsObject.readProject("Offline");
 +
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);
...
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox