[opencms-dev] OpenCMS and portlets.
Alexander Kandzior
alex at opencms.org
Wed Jul 28 17:50:01 CEST 2004
Link this:
cms.getRequestContext().setCurrentProject(cms.readProject("Offline"));
Best Regards,
Alex.
Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com
> -----Original Message-----
> From: opencms-dev-admin at opencms.org
> [mailto:opencms-dev-admin at opencms.org] On Behalf Of
> ttarrant at etnoteam.it
> Sent: Wednesday, July 28, 2004 4:57 PM
> To: opencms-dev at opencms.org
> Subject: RE: [opencms-dev] OpenCMS and portlets.
>
>
> > <%@ page import="org.opencms.main.*, org.opencms.file.*" %> <%
> > CmsObject cms = OpenCms.initCmsObject("Guest"); %> <p>Now I
> am user:
> > <b><%= cms.getRequestContext().currentUser().getName()
> > %></b></p>
> > <% cms.loginUser("Admin", "admin"); %>
> > <p>Now I am user: <b><%=
> > cms.getRequestContext().currentUser().getName()
> > %></b></p>
>
> Coincidentally, that is also what I needed. I also need to
> set the current project to offline. I see I can use:
>
> cms.getRequestContext().setCurrentProject(CmsProject)
>
> How can I retrieve the CmsProject for the "Offline" project ?
>
> Tristan
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list,
> please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>
>
More information about the opencms-dev
mailing list