[opencms-dev] In same document, show content from different vfs-locations

Yves Glodt yg at mind.lu
Thu Apr 30 22:43:12 CEST 2009


Hello  Achim,

direct edits still work as expected, yesterday.. today the direct edit 
somehow disappeared, although no settings or template code had 
changed... 

Don't worry about confused editors :-), we have no choice in this case 
and there is since some time a "common" and "individual" space in the 
vfs, where content in "individual" overwrites content from "common".

SSO in our case means that the browser has (if the user is logged-in) a 
certain cookie, and the template of the site checks in the DB whether 
the cookie corresponds to a valid session and reacts appropriately.

I guess it could be interesting to have a document (or seminar :) ) 
about best practices how to built private websites with OpenCms, which 
are linked to an erp-database :-)

Thanks for your suggestions,
Yves

On Wednesday 29 April 2009, a.westermann at alkacon.com wrote:
> Hi Yves,
>
> good you found a way. But it sounds a bit odd. You should take care
> if direct edit still works with that modified template. Sound strange
> because you are divorcing uri and content transparently.  Editors
> might get confused.
>
> Isn't it so that when logging into OpenCms by SSO you will contact
> some login jsp that will  cause a redirect to request parameter
> "requestedresource"? That would be  another point to go to the
> correct target depending on the user logged in.
>
> Kind Regards,
> Achim.
>
> -------------------
> Achim Westermann
>
> Alkacon Software GmbH  - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
>
> Visit OpenCms Days 2009 Conference and Expo
> June 15 to June 16 2009 in Cologne, Germany
> http://www.opencms-days.org
>
> Yves Glodt wrote:
> > I found the solution, reading the documentation helped ;)
> >
> > <cms:include element="body" editable="true" page="${replacedPage}"
> > />
> >
> > does the trick.
> >
> > When replacedPage == null it shows the initially requested page,
> > when it's not null, it shows the custom document from the vfs-path
> > ${replacedPage}
> >
> > OpenCms has impressed my yet another time.
> >
> > On Wednesday 29 April 2009 10:26:23 Yves Glodt wrote:
> >> On Wednesday 29 April 2009 10:23:12 Yves Glodt wrote:
> >>> Hello,
> >>>
> >>> I have the following situation, consider the following document
> >>>
> >>> /sites/mysite.com/en/contact.html
> >>>
> >>> This document is accessible by the "Guest user", without
> >>> OpenCms-login
> >>>
> >>> Now I have a situation where a certain (non-opencms) user is
> >>> logged in by single-sign-on, and I would like that when the user
> >>> requests the mentioned document, OpenCms would, instead of the
> >>> content of contact.html, show the content from
> >>> /sites/mysite.com/priv/${userid}/en/contact.html
> >>>
> >>> All this of course without that the URL changes or any redirect
> >>> happens.
> >>>
> >>> Note that /sites/mysite.com/priv/ is not accesible for guest
> >>> users, I have a special OpenCms-user which I log in from my
> >>> template which can retrieve content from this location.
> >>>
> >>> I think I would somehow have to intercept <cms:template
> >>> element="content"> ?
> >>
> >> I meant to intercept <cms:include element="body"  />, of course,
> >> which seems to be possible with the page attribute...
> >>
> >>> And make it retrieve the content from another document from the
> >>> vfs
> >>>
> >>> How would you do this?
> >>>
> >>> Best regards,
> >>> Yves


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090430/759b0819/attachment.htm>


More information about the opencms-dev mailing list