[opencms-dev] same content, different template sets?

Alexander Langer al at al-arenal.de
Sun Jun 29 15:19:01 CEST 2003


Yep, that's exactly what I am looking for. I'll try to find out how to
work with sessions in JSP (I only have experience with PHP, so I may
just have to go some documentation and howtos) and work out an
architecture that looks like this:

/index.jsp
/chapter1.jsp
/chapter2.jsp
/...
/html-content/index.html
/html-content/chapter1.html
/html-content/chapter2.html
/html-content/...
/system/modules/.../jsptemplates/skin1/index.jsp
/system/modules/.../jsptemplates/skin1/chapter.jsp
/system/modules/.../jsptemplates/skin2/index.jsp
/system/modules/.../jsptemplates/skin2/chapter.jsp

What should happen is, that the first access goes for example to:

chapter1.jsp?skin=1

The JSP then creates a new session and stores the skin id for this
session. Every other JSP just reads this data and uses the appropriate
template file and includes the html content file which can be edited
with the WYSIWYG editor. So I have only one set of JSPs what enables
my content maintainers tu use site internal links for example from
chapter1.jsp to chapter2.jsp. The session variable will take care that
during the session the right design/template set is used. Only one
initial call to a JSP with the skin id is necessary to change the
default template set.

For me this seems to be the right way, but by now it's just working in
my head. I have to do some reading and testing, but I don't see why
this shouldn't work.

You just have to take care, that if you use only subsets of the whole
content files in the "skins", you mustn't create links to other
subsets, otherwise you'll break your navigation and may present
content which shouldn't be presented.

> This is something which we needed when I was evaluating opencms.  I work at
> a University and the powers above wanted a 'staff' and a 'student' 'skin'
> and these would have to share some content and have totally different
> navigation/template.  I even tried pointing two documents to one body but
> this totally confused the editor and would break things :-(


al

-- 
Alexander Langer
homepage: http://www.al-arenal.de
mailto: langer at al-arenal.de





More information about the opencms-dev mailing list