[opencms-dev] Nice static export behaviour discovered by accident
Alexander Kandzior
alex at opencms.org
Fri Feb 15 12:46:37 CET 2008
Pere,
in fact this is working as desigend. It works with "on demand" static export
as well as "full export". I believe that in the Alkacon Documentation module
for the static export there are some examples that also show this behaviour.
Kind Regards,
Alex.
-------------------
Alexander Kandzior
Alkacon Software GmbH - The OpenCms Experts
<http://www.alkacon.com/> http://www.alkacon.com -
<http://www.opencms.org/> http://www.opencms.org
Visit us on CeBIT expo in Hannover, Germany
March 4 to March 9, 2008 - Hall 5 Stand F59/3
_____
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Pere Torrodellas
Sent: Thursday, February 14, 2008 5:15 PM
To: OpenCms Mail List
Subject: [opencms-dev] Nice static export behaviour discovered by accident
Hello,
I've just discovered a nice static export behaviour I was unaware of, and of
which I've been unable to find any reference in the OpenCms info sources.
Maybe someone can direct me to where it's explained?
By mistake I defined a page, "detall_fitxa.html", with export=true. But in
fact it's not static, because its template includes a JSP that produces
different output depending on an iput parameter. The different page
variations are requested from a menu page built by a search function, with
entries of the form:
<li><a href="<cms:link>/.../detall_fitxa.html?idFitxaOcup=<%= idFitxa
%></cms:link>" ...</a></li>
idFitxaOcup being the parameter that defines the specific output.
I expected this to return always the same output, the one corresponding to
the first invocation that triggers the export of detall_fitxa.html.
But it was working, and nicely serving the right different pages from the
export directory !!
To my amazement, in the menu page navigator source, instead of having
entries like:
<li><a href="/.../export/.../detall_fitxa.html?idFitxaOcup=1" ...</a></li>
<li><a href="/.../export/.../detall_fitxa.html?idFitxaOcup=2" ...</a></li>
<li><a href="/.../export/.../detall_fitxa.html?idFitxaOcup=3" ...</a></li>
OpenCms is producing entries of the form:
<li><a href="/.../export/.../detall_fitxa.html_1906779681.html"...</a></li>
<li><a href="/.../export/.../detall_fitxa.html_1906779812.html"...</a></li>
<li><a href="/.../export/.../detall_fitxa.html_1906779813.html"...</a></li>
and those pages with the strange names get indeed into the right export
directory and are served from there.
So by declaring one page exportable, I got N exported pages, one for every
input parameter that was being selected in the menu page.
This is not at all what I understood from the static export OpenCms info...
but it's really nice if you don't have a lot of different variations. It's
kind of like Flex with the "params" directive, but completely static...
Is this a documented feature? Did I miss it in the OpenCms documentation?
How can OpenCms decide the different page names in the menu before knowing
the whole set of possible parameter values??? Interesting stuff, but I feel
uneasy depending on it until someone tells me that this is "working as
designed".
Thanks for any info,
Pere
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080215/57ec05fd/attachment.htm>
More information about the opencms-dev
mailing list