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

Yves Glodt yg at mind.lu
Wed Apr 29 11:15:55 CEST 2009


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
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list