[opencms-dev] Publishing problems

Gerhard opencms at archeron.de
Wed Sep 3 16:55:49 CEST 2014


Hi Kai,

hm does that mean that if I am using relative links instead, I can avoid 
the static export? Just an idea ...

Concerning links: We only have two kinds of links

1. Links that are handled by JavaScript. These don't link to other pages 
but are for events etc., so not interesting here.
2. Links specified with OpenCmsVfsFile-fields or via properties. The 
code for the generation of these links is pretty long so I fear I can't 
post the whole code here. What I can post is the result: When I open an 
offline page in OpenCMS the links have the form

/servlet-prefix/path/to/some/interesting/page.html

online pages looks equal but without the servlet-prefix. Does that help?

Thanks&Regards,
Gerhard

Am 03.09.2014 15:45, schrieb Schliemann, Kai:
>
> Hi Gerhard,
>
> I try to answer for Fabian again.
>
> The additional prefix seems to be the OpenCms servlet name. In a 
> standard installation it is "opencms".
>
> How do you see this? Ok, we have no "export" in the URL. But is 
> "export" the unique sign for static exports?
> Because it seemed to be a relative link (/../../blablabla/). I didn't 
> see the leading / at first, so I thought that as well.
>
> And it must not be "export" in the URL for statically exported pages. 
> This is again the standard config.
>
> > Can you further post how a link to another OpenCms hosted page is generated.
> It is just a link from one page to another within OpenCms. For example 
> a link generated for the navigation, the sitemap or a link within your 
> content.
>
> BR
>
> Kai
>
> *Von:*opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] *Im Auftrag von *Gerhard
> *Gesendet:* Mittwoch, 3. September 2014 12:24
> *An:* The OpenCms mailing list
> *Betreff:* Re: [opencms-dev] Publishing problems
>
> Hi Fabian,
>
> ok now I am a bit confused, seems I still have to learn a lot about 
> OpenCMS haha. I will try to answer:
>
> <script type="text/javascript" 
> src="/pathTo/commonStuff/configuration/js/javascriptfile3.js"></script>
>
> This is indeed the form which appears in the online version. In the 
> offline there is an additional prefix in front:
>
> <script type="text/javascript" 
> src="/aPrefix/pathTo/commonStuff/configuration/js/javascriptfile3.js"></script>
>
>
> >then the template makes no use of the static export feature.
>
> How do you see this? Ok, we have no "export" in the URL. But is 
> "export" the unique sign for static exports?
>
>
> <script type="text/javascript" 
> src="<cms:link>/pathTo/commonStuff/configuration/js/javascriptfile3.js</cms:link>"></script>
>
> This is exactly the form we use in our templates.
>
> > Can you further post how a link to another OpenCms hosted page is 
> generated.
>
> Not sure if I got you right here. We have an Util-class which converts 
> OpenCmsVfsFile-values into a link in OpenCMS which can be used with a 
> simple <a/> tag. Is that what you mean?
>
> Thanks&Regards,
> Gerhard
>
>
> Am 03.09.2014 11:55, schrieb fhsubscriptions at componio.net 
> <mailto:fhsubscriptions at componio.net>:
>
>     Hi Gerhard,
>
>     let me clarify :-)
>
>     <script type="text/javascript"
>     src="/../../configuration/js/javascriptfile3.js"></script>
>
>     If this is the link in the online generated HTML then the template
>     makes no use of the static export feature.
>     However if this is the link generated while in the offline project
>     it still is not a typical OpenCms link thus I guess that your
>     template does not look like this:
>
>     <script type="text/javascript"
>     src="<cms:link>/path/to/the/proper/directory/configuration/js/javascriptfile3.js</cms:link>"></script>
>
>     And again:
>
>     Can you further post how a link to another OpenCms hosted page is
>     generated._
>     _
>
>     \Fabian
>
>
>     Am 03.09.2014 11:31, schrieb Gerhard:
>
>         Hi Fabian,
>
>         yes this is the browser generated HTML, the template code is
>         below that ;-)
>
>         Cheers,
>         Gerhard
>
>         Am 03.09.2014 11:29, schrieb fhsubscriptions at componio.net
>         <mailto:fhsubscriptions at componio.net>:
>
>             Hi Gerhard,
>
>             Am 03.09.2014 11:17, schrieb Gerhard:
>
>                 <script type="text/javascript"
>                 src="/../../configuration/js/javascriptfile3.js"></script>
>
>
>             This is not a typical OpenCms link. Do you make use of the
>             <cms:link /> tag?
>             Can you further post how a link to another OpenCms hosted
>             page looks like?_
>
>             _Thanks,
>
>             \Fabian
>             _
>
>
>             _
>
>             _</head>
>
>             We include all static files like pictures, CSS,
>             JavaScript-files like this:
>
>             <div class="icon">
>                 <img
>             src="<cms:link>/common/../../picture.png</cms:link>">
>             </div>
>
>             Files which are specified as content when editing in
>             OpenCMS are accessed via the I_CmsXmlDocument Interface
>             but I am not sure if you meant that too.
>
>             I am not sure what exactly gets statically exported. I
>             read about static export "on demand" and I guess this is
>             the mechanism used because we never do a manual static
>             export in the administration panel.
>
>             Concerning that Nginx our service provider said that it is
>             only proxying but doesn't cache anything.
>
>             Thanks&Regards,
>             Gerhard
>
>
>             _
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140903/510135e6/attachment.htm>


More information about the opencms-dev mailing list